B
brian b
I found the following on the Access Web:
To filter records in a combo/listbox based on the value selected in another
combo/listbox, you can use a stored query which uses the first control's
value as a parameter. For example,
Select PeopleID, PeopleName from tblPeople Where PeopleID =
Forms!FormName!NameOfFirstControl;
Then all you need to do is issue a Requery on the second combo/listbox in
this first control's AfterUpdate event.
Private Sub NameOfFirstControl_AfterUpdate()
Me!NameOfSecondControl.Requery
End Sub
This works fine when I use the Mouse to move around my form. When I tab
from the first combo box, I lose the filtered records in the second combo
box. What gives?
To filter records in a combo/listbox based on the value selected in another
combo/listbox, you can use a stored query which uses the first control's
value as a parameter. For example,
Select PeopleID, PeopleName from tblPeople Where PeopleID =
Forms!FormName!NameOfFirstControl;
Then all you need to do is issue a Requery on the second combo/listbox in
this first control's AfterUpdate event.
Private Sub NameOfFirstControl_AfterUpdate()
Me!NameOfSecondControl.Requery
End Sub
This works fine when I use the Mouse to move around my form. When I tab
from the first combo box, I lose the filtered records in the second combo
box. What gives?