Hi all,
I am very new to access and just dipping my toes into VBA coding. I am trying to code a combo box to filter my form on the after update event. Based on my searches in forums and online, I currently have the following code though it is not working for me.
Private Sub OrderStatusSearchBar_AfterUpdate()
If IsNull(Me.OrderStatusSearchBar) Then
Me.Filter = False
Me.Filter = ""
Else
Me.Filter = "OrderStatus=" & Me.OrderStatusSearchBar
Me.Filter = True
End If
End Sub
When opening the form, I get no errors in my form however, all records are now showing as "#Name?" as per the below. Changing the drop down options my my search box does nothing at all.
Cannot stress enough just how new I am so any help at all is greatly appreciated.
Thanks,
M3opa
I am very new to access and just dipping my toes into VBA coding. I am trying to code a combo box to filter my form on the after update event. Based on my searches in forums and online, I currently have the following code though it is not working for me.
Private Sub OrderStatusSearchBar_AfterUpdate()
If IsNull(Me.OrderStatusSearchBar) Then
Me.Filter = False
Me.Filter = ""
Else
Me.Filter = "OrderStatus=" & Me.OrderStatusSearchBar
Me.Filter = True
End If
End Sub
When opening the form, I get no errors in my form however, all records are now showing as "#Name?" as per the below. Changing the drop down options my my search box does nothing at all.
Cannot stress enough just how new I am so any help at all is greatly appreciated.
Thanks,
M3opa