Drilling down in 3 list boxes

  • Thread starter Thread starter Teresa
  • Start date Start date
T

Teresa

I have a form, I want to make a selection from 3 different
list boxes. I then want to use the 3 selected values to
lookup to a record in another table, retrieve some data
and write the record. Can anyone point me in the right
direction, I seem to be running in circles!
 
I would create a sql command with the values in all three
list boxes and then execute a docmd.runsql. Ex:

dim SQLString as string

SQLString = "SELECT
.[FIELD1],
.[FIELD2],
.[FIELD3] INTO TABLE2 WHERE (((
.[FIELD1])=
& LISTBOX1 & " AND (
.[FIELD2])= & LISTBOX2 & " AND
(
.[FIELD3])= & LISTBOX3 & "));"

DOCMD.RUNSQL SQLSTRING
 
Back
Top