W
Willburr
Hi,
I have a database where I need the output from one list box (listbox1) to
determine the values displayed in a second list box (listbox2). listbox1
contains the fields MailCodeID and MailCode. Each MailCode is associated
with one or more FloorCodes, and listbox2 contains the fields FloorCodeID and
FloorCode. When a MailCode is chosen in listbox1, I want the listbox2 to
display only the FloorCodes/FloorCodeIDs associated with the MailCode chosen
in listbox1. I created a query called qryEditFloor which associates all
MailCodeIDs/MailCodes with their associated FloorCodeIDs/FloorCodes.
I need listbox1 to be unbound, so I have set it up the row source property to:
SELECT DISTINCT qryEditFloor.MailCodeID, qryEditFloor.MailCode FROM
qryEditFloor;
Ideally, when listbox2 is populated with the proper FloorCodeIDs/FloorCodes,
the associated data in qryEditFloor will be displayed on my form for
edification.
I cannot find any SQL commands or VBA syntax which will return only the
FloorCodeIDs and FloorCodes in listbox2 associated with the
MailCodeID/MailCode inputted in listbox1. Has anyone ever encountered this
problem and if so, did you find a solution? I really appreciate anyone's
help with this problem!
I have a database where I need the output from one list box (listbox1) to
determine the values displayed in a second list box (listbox2). listbox1
contains the fields MailCodeID and MailCode. Each MailCode is associated
with one or more FloorCodes, and listbox2 contains the fields FloorCodeID and
FloorCode. When a MailCode is chosen in listbox1, I want the listbox2 to
display only the FloorCodes/FloorCodeIDs associated with the MailCode chosen
in listbox1. I created a query called qryEditFloor which associates all
MailCodeIDs/MailCodes with their associated FloorCodeIDs/FloorCodes.
I need listbox1 to be unbound, so I have set it up the row source property to:
SELECT DISTINCT qryEditFloor.MailCodeID, qryEditFloor.MailCode FROM
qryEditFloor;
Ideally, when listbox2 is populated with the proper FloorCodeIDs/FloorCodes,
the associated data in qryEditFloor will be displayed on my form for
edification.
I cannot find any SQL commands or VBA syntax which will return only the
FloorCodeIDs and FloorCodes in listbox2 associated with the
MailCodeID/MailCode inputted in listbox1. Has anyone ever encountered this
problem and if so, did you find a solution? I really appreciate anyone's
help with this problem!