Limit selection in one Combox based on selection in another combo

  • Thread starter Thread starter Greg H.
  • Start date Start date
G

Greg H.

I have very little knowledge in Access and I hope some one will be able to
help with this simple request.

I have a table (tblreasons) similar to this:
Primary Secondary
A 1
A 2
A 3
B 4
B 5
B 6

I also have a table (tblrecords) that hold account records. There are two
columns that do a lookup on both the primary and secondary from tblreasons.
The user will access a form (frmInput) and bring up records from tblrecords.
The user will then need to select the primary and secondary for that record
from a combo box. When a selection is made in combo box 1 (linked to
primary) it will limit the selection in combo box 2 (linked to secondary).
How can I accomplish this?
 
Greg,
Use the value selected in cboPrimary to filter the results displayed in
cboSecondary.
In the query behind cboSecondary use this criteria against the field
Primary...
= Forms!frmInput!cboPrimary

On the AfterUpdate event of cboPrimary, do a...
cboSecondary.Requery
to "synch" cboSecondary, whenever cboPrimary changes.

On my website (below) I have a sample 97 and 2003 file called "Synched
Combos"
It demonstrates the above method.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Back
Top