Refreshing data without closing form

C

Cat@onic

I have a form with 2 tab controls. On Tab 1 if you enter the first 3 letters
of the name and the dropdown doesn't happen, you know it's a new name. So you
click Tab 2 and enter the Name details. When you return to Tab 1, the name's
still not in the dropdown list. I put in a button with the following code,
which works, but how could I do it WITHOUT having to press the button?
 
C

Cat@onic

Jeff Boyce said:
No "following code".

Look into the tab control's OnChange event -- you could add something like:

Me!YourComboBox.Requery

This should refill the combo box when you switch between tabs.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/

Sorry I forgot the code. It's just a refresh:

Private Sub Refresh1_Click()
On Error GoTo Err_Refresh1_Click


DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

Exit_Refresh1_Click:
Exit Sub

Err_Refresh1_Click:
MsgBox Err.Description
Resume Exit_Refresh1_Click

End Sub

Thanks. Be back later when I've tried your suggestion.

Cat@onic
 
Top