Where in a query (1 Viewer)

srideout2525

Registered User.
Local time
Yesterday, 21:40
Joined
Mar 4, 2003
Messages
81
I have a combo box filled with customer addresses in a subform of the custmer form. When I select the addresses in the combo box i want to have only the current customers addresses to appear. Currrently I have ALL the addresses appearing.

I feel like it should be a where claus in the query but uuncertain how to approach it.

Any help
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:40
Joined
Feb 19, 2002
Messages
43,477
Open the query in design view. In the criteria cell for the AddressID, put a reference to the combo:

Forms!MyFormName!MyComboName
 

srideout2525

Registered User.
Local time
Yesterday, 21:40
Joined
Mar 4, 2003
Messages
81
Maybe I wasn't very clear... let me try again.lol


I have a Client Form. There are 3 subforms. Quote, Vehcile and Address.

so a client can have many of each.

on the Quote i want to have a combo box filled with the clients addresses.
but i'm getting all the addresses.

It's as though i need to grab the client ID value that is current. I've tried taking the client ID directly from the frmClient, as well as the subform, but i still get all the addresses.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:40
Joined
Feb 19, 2002
Messages
43,477
The RowSource of your combo needs to point to a query (rather than a table) with the selection criteria that I suggested earlier.
 

srideout2525

Registered User.
Local time
Yesterday, 21:40
Joined
Mar 4, 2003
Messages
81
Not working.


I based the query on Quote and Address tables. The AddressID from tblAddress, I put [Forms]![sfrmRoute]![cboAddressID1] in the criteria.

But I don't get anything show up in the combo box. :(
 

Users who are viewing this thread

Top Bottom