I have a tabbed form, 3 tabs, each corresponding to a different table. The controls on each tab are the same (the structure of the underlying tables are identical).
I have the tab control’s Change event triggering a change in the Record Source property of the Form, but I’m missing something.
As I change from one tab to another, it seems to change the record source of the form, but not all controls update. I tried adding a Requery to the individual controls, but it doesn’t change. The mainone’s I’m having a problem with are combo boxes. They don’t seem to refresh themselves.
Any help? My code is below:
Dim tbc As Control, pge As Page
Dim ctl As Control
Dim strSource As String
Set tbc = Me!TabCtl0
Set pge = tbc.Pages(tbc.Value)
If tbc = 0 Then
strSource = “tblLiquids”
ElseIf tbc = 1 Then
strSource = “tblSolids”
ElseIf tbc = 2 Then
strSource = “tblTopicals”
End If
Forms!EntryForm.RecordSource = “SELECT * FROM ” & strSource
Forms!EntryForm.Refresh
thanks,
Craig