Requery a comboBox

just wondering if its possible to requery a Combo box with text allready partially entered
(ie a Name Combobox from table with hundreds of names the drop down list changing with every text character entered)
way I figure should be possible with a requery on update for field with a criterea of [Name]=[Name] but with a partial selection like a column selection works

Sponsored Links:

Related Topics

requery mainform unbound combobox using subform combobox value afterupdate
I want to requery form1 from the afterupdate event of form2, but using the combobox value in the form2, as the form1 combobox value.
In form2, I enter opportunity name in a text box and country selected in a combobox dropdown.
The country selected in the combobox of form2 is used to determine the record in form1 unbound combobox

Use combobox to control Subform
I realise this question has been asked before but the answer haven't been able to figure it out.

I have a form with a single combobox "Contact_Type" that is populated form a contact type table. The form also has a subform "Clients_Subform" that is to list all the clients with a particular contact type. Now my combobox defaults to the first contact type and the subform lists those clients.
Two problems

One: When I default the combo box to the second contact type the subform list still gets populated with the clients from the first contact type.

Two:When I select a new contact type from the combobox nothing gets updated. For this I have tried new events in the afterupdate

1 Me.Requery
2 Me.Refresh
3 Me![subform_name].Form.Requery
4 Form![Main_form_name]![subform_name].Requery

Nothing seems to work!

Cannot requery combobox from another form
It's a hot day here in the UK, but I've promised to finish some Access programming for the database that handles bookings for our training courses at work, and I can't update a combobox oneone form from a button on another form.

Form A is a waiting list of people who want to attend one of our several courses.
Form B is a bookings form where the operator selects a course from a list, a person's name from a combobox then clicks a button to make the booking.

I'm trying to make things easier for the operators by allowing them to highlight the entry for person X in form A, then click a button on form A that opens form B and writes SQL code (whichcontains a where statement that identifies the ID number of person X) to the recordsource property of the combobox.
The code then requeries the combobox to populate the rest of the columns and other controls on form B.

The problem is the combobox on form B doesn't seem to requery. I'm writing to the bound column but after .requery the columns contain nulls, but if I click the combo box it drops down toshows only one person correctly identified by the ID value I've written to it.
I can write values to text boxes on form B easily from one form to another, but the combobox has 16 columns (don't ask) so I don't want to go down the route of adding many extra hidden text boxes to form B.

DoCmd.OpenForm "BookCourses"
Forms!bookcourses!cmbFindDelegate.RowSource = strSQL1 & strSQL2

sample database form(s) updating combobox
I have a form w/combobox, if not in list a subform popups and new user information needs to be entered/save which works fine, but I need the a) combobox doesnt requery - but instead I'm stuck in a loop, of do "do you want to reenter", does anyone have a sample of how they got this to work

query return different results, even if the tables and criteria have not changed?
I have a combo box that gets names from a query that contains two tables, and a group table that has data on when a person joined a group and when they left the group.

My issue is when a run a requery command from a button, field, or whereever, sometimes all the names doesn't come up in the combobox as they should. I hit requery again, and they populate.

Even if I change the combo box to a text box, samething happens. Its not all names though. I can click the combo and 3 names are available. I hit requery and then all 6 names will show up.

I might hit requery again and nothing will happen, then again and 3 names drop off the list.

RowSource question
I am using (2) combo boxes. The second is a requery from the first. I am getting "PartNumber" in the second combobox. I have several fields setup in the second combobox.

How do I get multiple fields to come out in the second combobox? Is there a way to add multiple fields to RowSource or do I need to do this differently?

Navigation Form control syntax 2010
I have a load of forms that now have been put into navigation forms using Access 2010 wizard. I know have found that most of the controls such as cascading comboboxes don't work and other comboboxes ask me for the parameter values when I open the form. I am unsure of the syntax for referning to these as I know the navigation forms are subforms and sonme of the comboboxes are in subforms themselves. I have as an example a combobox (cmboDepartmentID) that is asking me for the parameters whenever I open the formEvent ( through the navigation menu) this then has an unbound combox (cmboSubteamSF) on a subform (SubFormSubTeam). I have tried to work out the new reference but it isn't working so far I have as requery on the cmboDepartmentID:
Forms!frmMainNavigation!NavigationSubForm!Form!Sub formSubTeam.Form!cmboSubTeamSF.Requery but this doesn't requery and the combobox is blank. Can anyone point me in the right direction please

Requery Issues
I am pretty new to Access and have already received some good advice from this forum (thanks kipcliff!).

I am having some issues with requerying a combobox on a form. I have two tables, tblPatient with pkUMRN (not autonumber, a 8 digit alphanumeric code) and tblAdmission with pkAdmissionID andfkUMRNAdmission (linked to tblPatient_UMRN).

The control on the form (frmMaster) is combobox tblAdmission_UMRNAdmission, and entering a known UMRN code autopopulates the form with data from tblPatient. Entering an unknown UMRN in to the tblAdmission_UMRN combobox starts a Not In List event macro that opens a form (frmNewPatient) for UMRN/tblPatient data entry as new record.

My problems are:
- I get the error notification "the text you entered isn't an item in the list" as the frmNewPatient pops up. How do I disable this error message?
- The frmNewPatient opens a new record. Is it possible to copy across the UMRN entered in the frmMaster combobox tblAdmission_UMRNAdmission (ie the the unknown UMRN that initiated the NotIn List macro) in to the tblPatients_UMRN control in the frmNewPatients? Or does it have to be re-entered manually?
- After I enter the tblPatients data via the frmNewPatient, save and close, the tblPatient updates but the combobox tblAdmission_UMRNAdmission doesn't update unless the frmMaster is closed and reopened.

I have tried running requery macros linked to Event On Got Focus for frmMaster and Event After Update on the combobox. I have tried these requery macros both with and withoutUMRNAmission set as the control.

Combobox value in form to determine criteria for subform
I would like to have a combobox on a form, which allows one to select a year, and upon doing so this will filter the records displayed in the subform so that it only displays those records from the selected year.

To do this, do I need to enter a VBA code into the 'after update' property of the combobox, which requery's the subform, and adds a new 'year' clause to the year column of the underlying query?

Brain Freeze help with combobox and query
I have a personnel form with typical personnel data. On the form is an combo that has a data source of employeeID, LastName, First name. The first (0) column is bound to the combo.

The query that feeds the form references the combo as criteria against the employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.

ComboBox Requery doesn't Work
I have an unbound Employee Time Card form that Inserts many records at once. I use a combobox to display the active employees. I'm trying to create a macro that would set a true / False field to true (in Employees table) after this employees records have been added. Once the employee records have been added I would like to have this persons name removed from the combobox.

The Following code does set the True / field to true, but after requerying the combobox it does not remove name from list. If I close form then reopen the name is removed from the list.

Is there another event that is more suited for this?

Private Sub ClearcboEmployee()
Dim strCriteria As String

strCriteria = "EmployeeID = " & "'" & Me.cboEmployee & "'"
rstEmployees.Find strCriteria, 0, adSearchForward

If Not (rstEmployees.BOF And rstEmployees.EOF) Then
With rstEmployees
![EmployeeTemporaryInactive] = True
End With
End If

Me.cboEmployee = ""

Requery Problem.
I have a requery to search for ad members on my db, but it does not seem to be working correctly. It is requery immediately after something is typed in the box. I want it when it is entered fully in. What am I missing?

Datasheet with one combobox dependent on another combobox
I have a very simple setup:
Table Size: rows with different sizes
Table Type: rows with different types
Table Type_Size: rows showing which Sizes/Types combinations are permitted.

Thus Type 1 might be available in Size S and M, but Type 2 might only be available in Size L.

I have set up a form (I.e. for purchases) that allows a user to choose a Type from a combobox (easy query to fill the combobox). There is also a Size combobox with a simple query that addsan additional WHERE clause to only show Sizes for the specific Type selected in combobox #1 (based on the allowed combinations listed in Type_Size).

I requery combobox #2 based on two events: change in combobox #1, or change in current record. As a form this works beautifully! I can only choose Sizes appropriate to each Type. Exactly what I want.

Now I want to convert said form to a Datasheet. The query for the combobox #2 is the same across all rows of the Datasheet. In fact the results are pretty funny. If I have say 10 rows already displayed in the Datasheet and I select a row that has an item of Type 1, then all the rows with items Type 1 will list the size that was selected for that entry (since the querybecomes valid).

All the other rows will not show a size -- unless that size happens to also be available for Type 1.

Quick coding-orginization question
I'm just learning coding in Access and I had to write this code (below) for a form, but I'm sure this is not truly the best or most concise way to write this.How could I have written this more simply? I know there's got to be a better way.

Sub TrackingRequery()
Me.cboYear1.Value = Null
Me.cboYear2.Value = Null
Me.cboYear3.Value = Null
Me.cboYear4.Value = Null
Me.cboYear5.Value = Null
Me.cboYear1Percent.Value = Null
Me.cboYear2Percent.Value = Null
Me.cboYear3Percent.Value = Null
Me.cboYear4Percent.Value = Null
Me.cboYear5Percent.Value = Null End Sub

Requery Report with VBA
One of my reports has a popup form that allows one of the data fields to be changed. When this little popup form is closed, I want to Requery the report. I was able to requery the report with Me.Requery, but I am trying to reference the report by name.


Requery form
I have a form that shows information about a course. if you click on the "edit course info button" a pop appears to edit the info once you edit and hit submit the update query runs and then the original for should requery but it does not.
Here is the requery code

And here is the code for the form that should requery...

cascade combobox problem.
I have two comboboxes on a subform. The first combobox is used to populate the second combobox. These are placed in the detail section of the form.I want them to work this way:when I select any value from the first combobox,I want the second combobox of the same row to get populated by relevant value.

As of now, I have tried to implement this and as I select any value from the first combobox of row 1 I see the second combobox of the same row gets populated but as I go on selecting values from the first set of comboboxes I see that the values in the second set of the comboboxes above changing or becoming null.

The 1st combobox is cboRCMTask:

VBA: combobox not defined?
made an unbound form with one combobox used to filter another. Everything worked great until I used "Option explicit" in the code. I get this error:

What it says is that the AfterUpdate gives a Variable Not Defined error.

Here's the AfterUpdate code:

Private Sub cboHoofd_AfterUpdate()
Me.cboSub1 = Null
Me.cboSub1 = Me.cboSub1.ItemData(0) End Sub

Setting font colour within combobox
I have a combobox on my form, the combobox has 3 values (1, 2 and 3).

Is it possible to set the colour of the text within the combobox?
1 = Red
2 = Orange
3 = Green

requery a list box in another form
I have a form that closes. the form that navigated to that form remain open at all times. when form x closes I want to requery(refresh) the list box on form z. any ideas how to do that. I have tried the requery and refresh methods on close event with macros but it dosnt like it.

I tried

requery =[Forms]![frmDiaryView]![lstAppointments]

when the form closes and tries to requery the lstAppointments it says it cannot be found. I have got the spelling correct but it dosnt work