Estoy tratando de hacer un formulario, pero no me funciona

Este es el código:

Private Sub Search_Click()
Dim wh$
DoCmd.Close acForm, "Records" '
wh = "true"
If Not IsNull(Me.Bill_of_Lading) Then wh = wh & " and Bill_of_Lading like '" & Me.Bill_of_Lading & "*'"
If Not IsNull(Me.Container) Then wh = wh & " and Container like '" & Me.Container & "*'"
If Not IsNull(Me.Inventory) Then wh = wh & " and Inventory like '" & Me.Inventory & "*'"
If Not IsNull(Me.Order2) Then wh = wh & " and Order2 like '" & Me.Order2 & "*'"
If Not IsNull(Me.Suborder) Then wh = wh & " and Suborder like '" & Me.Suborder & "*'"
DoCmd.OpenForm "Records", , , wh
DoCmd.Close acForm, "Search"
End Sub

Me funciona Container, Inventory, Order2 y Suborder pero Bill of Lading no. Me podrías ayudar con el problema. Soy nuevo en esto. De antemano muchas gracias!!!

Añade tu respuesta

Haz clic para o