C
CJ
Hi Groupies:
I am trying to open another form when I double click an item in a listbox.
However, I keep getting a parameter error. I don't understand why I am
getting this error because the field on the form I am trying to open is
definitely called SKU Number. The good news is that the parameter shows that
it has the correct value selected but when I click OK the form opens up
empty.
Here is my code:
Private Sub lstTruckInventory_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInventory"
stLinkCriteria = "[SKU Number]= " & Me.lstTruckInventory.Column(0)
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
Could somebody please fix this for me?
I am trying to open another form when I double click an item in a listbox.
However, I keep getting a parameter error. I don't understand why I am
getting this error because the field on the form I am trying to open is
definitely called SKU Number. The good news is that the parameter shows that
it has the correct value selected but when I click OK the form opens up
empty.
Here is my code:
Private Sub lstTruckInventory_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInventory"
stLinkCriteria = "[SKU Number]= " & Me.lstTruckInventory.Column(0)
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
Could somebody please fix this for me?