combo box used for record search - results dependent on 2 key fields

jim84

Registered User.
Local time
Today, 21:25
Joined
Nov 4, 2002
Messages
23
Hello,

Im posting in need of some advice! I've used combo boxes as search tools on forms before with no problems. This being you select a record from the drop down (usually by the key) and subsequent text boxes and subforms update appropriately.

THEN THE PROBLEMS BEGAN! :eek:

I have a table called "Buildings/Rooms". This table has 2 keys "Building" and "Rooms". The records within this table are only individually segregated by the combination of the 2 keys.

i.e Many records have the key "Building1". Many records have the key "G01" but only one record will have the combination "Building1+G01"

So now i have a form. The aim of this form is for a user to be able to select a "building + room" and the corresponding records will show in text boxes and a subform.

The problem is, despite my efforts to change this, the text boxes and subform are only relating to the first key after the combo selection, that being "building" and the 1st record of that "building". So my text fields are the same for every building choice and my subform shows all records relating to that building, not the building+room as desired! This is despite the my combo dropdown having a list of all the records of building+room and you being able to select any of these.

Should i be using 2 combo boxes? one for each key? if so how do you relate the combination of these to give the results you want? Is this a problem where combo boxes wont work? Is there a better way of approaching this?

Any advice anyone can give would be most helpful, id be very appreciative in this sticky time!!

Thanks a lot,

Jim.
 
As originator you can delete posts by using the Edit and Delete buttons
 
sorry, i thought every post attempt had failed.

So, can anyone help with this ^

Thanks.

Jim.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom