Good day!
I use the follwoing code to filer a filed on a form
Public Function FilterForm()
On Error GoTo errlbl
Set SelectedButton = ActiveControl
Me.Controls(ActiveControl.Tag).SetFocus
Me.Recordset.MoveFirst
DoCmd.RunCommand acCmdFilterMenu
Exit Function
errlbl:
If Err.Number = 3021 Then
MsgBox "No records Returned", vbInformation
Me.Filter = ""
Me.FilterOn = False
SetButtons
Else
MsgBox Err.Number & " " & Err.Description
End If
End Function
I use a combo box for the particular bound field. It was working fine but I had a requirement to make the row source of the combo box comes from two tables using Union SQL statement
The contents of the combo box are fine and collate data from two tables BUT when I use the filter form it shows only those elements in the control source not the row source.
Kindly advise
I use the follwoing code to filer a filed on a form
Public Function FilterForm()
On Error GoTo errlbl
Set SelectedButton = ActiveControl
Me.Controls(ActiveControl.Tag).SetFocus
Me.Recordset.MoveFirst
DoCmd.RunCommand acCmdFilterMenu
Exit Function
errlbl:
If Err.Number = 3021 Then
MsgBox "No records Returned", vbInformation
Me.Filter = ""
Me.FilterOn = False
SetButtons
Else
MsgBox Err.Number & " " & Err.Description
End If
End Function
I use a combo box for the particular bound field. It was working fine but I had a requirement to make the row source of the combo box comes from two tables using Union SQL statement
The contents of the combo box are fine and collate data from two tables BUT when I use the filter form it shows only those elements in the control source not the row source.
Kindly advise