G
Guest
Access 2000
I've got Form A, which has a combo box with a list of items from Table B.
The combo box has the focus when I open the form. If the item I want isn;t
in the list I can use the bottun on the form to open Form B, which allows me
to add a record to Table B.
I close Form B, which leaves me back at Form A where I want the new record
to appear in my combo box.
I've tried using the OnClick and OnEnter events for the combo box with both
the DoCmd.requery and the xxx.requery methods but neither cause a requery to
happen.
Here's the code I've tried:
Private Sub Combo20_Click()
Dim ctlLstBox As Control
Set ctlLstBox = Me!Combo20
ctlLstBox.Requery
End Sub
And:
Private Sub Combo20_Click()
Dim ctlLstBox As Control
Set ctlLstBox = Me!Combo20
DoCmd.requery ctlLstBox
End Sub
Looking at this I now wonder if the Me! is the problem?? I used that
because the form has a space in the name.
I've got Form A, which has a combo box with a list of items from Table B.
The combo box has the focus when I open the form. If the item I want isn;t
in the list I can use the bottun on the form to open Form B, which allows me
to add a record to Table B.
I close Form B, which leaves me back at Form A where I want the new record
to appear in my combo box.
I've tried using the OnClick and OnEnter events for the combo box with both
the DoCmd.requery and the xxx.requery methods but neither cause a requery to
happen.
Here's the code I've tried:
Private Sub Combo20_Click()
Dim ctlLstBox As Control
Set ctlLstBox = Me!Combo20
ctlLstBox.Requery
End Sub
And:
Private Sub Combo20_Click()
Dim ctlLstBox As Control
Set ctlLstBox = Me!Combo20
DoCmd.requery ctlLstBox
End Sub
Looking at this I now wonder if the Me! is the problem?? I used that
because the form has a space in the name.