Help - Combo boxes and subforms

helpme5

Registered User.
Local time
Today, 03:47
Joined
Jan 15, 2008
Messages
14
Hi,

I have a form that is based on a query which looks up values in three different tables. I also have a subrform which looks up order information from the tables, all in the same form.

I need to have a combo box that includes the surnames of customers. When I select a customers surname, the customers booking information needs to appear in the subform and the customer information appears in the main form.

Does anyone know how to do this, preferably without code.

Thanks.
 
Thanks.

The problem is though that I do not get that option in the combo box wizard I only get the first two options (or the other two not including that)!

I will look into that though!
 
What i would suggest is that you have the controls in the main form and the subform unbound, and then simply set the record sources for the main and subform to the required SQL statements on the ComboBox Click event.

it would basically be

SQLONE = "SELECT * FROM usersTable WHERE usersTable.ID = " & comboBox.Value
SQLTWO = "SELECT * FROM bookingTable WHERE bookingTable.userID = " & comboBox.Value

The combo box would contain two columns, the first being UserID, the second being userLastName, with the column widths being 0cm;2cm so that the ID field is not actually visible
 

Users who are viewing this thread

Back
Top Bottom