G
Guest
I'm using one combo box (cmbo1) to limit the results of another combo box
(cmbo2). The record being generated is freight claim.
cmbo1.rowsource = "select projid, projname from projects_table"
cmbo2.rowsource = "select contactid, contactname from projects_contact_table
where projid = " & me!cmbo1
private sub cmbo1_afterupdate()
me!cmbo2.requery
end sub
id fields are the bound columns
Frghtclaim1 was created fine. AddNew. Frghtclaim2 - after selecting the
projid in cmbo1 i go to cmbo2 and select the contactid. go back to
frghtclaim1 and the cmbo2 field is blank as well as the drop down - i know
that records exist for this project. close frghtclaim form. open form.
frghtclaim1 now shows the correct information. go to frghtclaim2 - cmbo2 is
blank and the drop down now gives me the record for frghtclaim1 only.
took out the where clause. go back to frghtclaim1 - correct info.
frghtclaim2 - correct info. AddNew. frghtclaim 3 - cmbo2 shows all records
that exist.
changed the cmbo1_afterupdate to set the recordsource for cmbo2. AddNew.
only option is the one correct one. save record. page through previous
records - combo2 is blank and only option listed is the one for the new
record.
any ideas?? thanks.
working in Access 2007 with a database as 2003 format.
(cmbo2). The record being generated is freight claim.
cmbo1.rowsource = "select projid, projname from projects_table"
cmbo2.rowsource = "select contactid, contactname from projects_contact_table
where projid = " & me!cmbo1
private sub cmbo1_afterupdate()
me!cmbo2.requery
end sub
id fields are the bound columns
Frghtclaim1 was created fine. AddNew. Frghtclaim2 - after selecting the
projid in cmbo1 i go to cmbo2 and select the contactid. go back to
frghtclaim1 and the cmbo2 field is blank as well as the drop down - i know
that records exist for this project. close frghtclaim form. open form.
frghtclaim1 now shows the correct information. go to frghtclaim2 - cmbo2 is
blank and the drop down now gives me the record for frghtclaim1 only.
took out the where clause. go back to frghtclaim1 - correct info.
frghtclaim2 - correct info. AddNew. frghtclaim 3 - cmbo2 shows all records
that exist.
changed the cmbo1_afterupdate to set the recordsource for cmbo2. AddNew.
only option is the one correct one. save record. page through previous
records - combo2 is blank and only option listed is the one for the new
record.
any ideas?? thanks.
working in Access 2007 with a database as 2003 format.