Topics Search

Requery a comboBox

Requery a comboBox
Views: 13
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:

More 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.