ComboBox!!!

Waldin

Registered User.
Local time
Today, 05:02
Joined
Oct 11, 2012
Messages
109
Great Morning Experts.

In my form I have a ComboBox Field.

The Row Source Currently Tells the ComboBox to display all the current entries in the database, however, i only want records related to the entry im in to be displayed in the combobox.

So using code, how do i tell the ComboBox to only display records related to this specific entry, i could use the RegistrationNumber Field as the "keyword/Criteria" field, so all registration numbers that are the same would only be displayed in this ComboBox.

how do i achieve this.

I'd be Eternally gratefull.:banghead:
 
Great Morning Experts.
I do not consider myself as an expert, but I would suggest adding a WHERE clause to the Row Source property of the combo box that references the "RegistrationNumber" field as the criteria. Maybe something like:
WHERE [RegistrationNumber] = [Forms]![NameOfYourForm]![RegistrationNumber]
I think you will also need the following line of code in the Got Focus event of the combo box:
Me.ActiveControl.Requery
 
thanks Bob, but now i get the error: the record source '~sq_cQuotation~sq_cAdditionals' specified on this form or report does onot exist.

Quotation is my form name
Additionals is my ComboBox Fields name
 
Can you show us your WHERE clause.
Can you tell us what the Name property of the combo box is.
 
the ~ characters, generally indicate a deleted form/object

i would probably delete the control, and start over.

alternatively go into the query design pane, of the combo box, and make sure that is working properly
 
thanks i deleted the control and started over, it wasnt much of a mission.
 

Users who are viewing this thread

Back
Top Bottom