Greetings:
I'm trying to conduct a search for a variable using a form in vbscript. I am trying to use this code but it dosen't seem to work out
Item.value and Label.Value are textbox in the form that the user can enter for a search. I get an error when trying to run this and I really don't know much about vba and mysql commands so I'm kinda lost there.Code:Dim SQLstr As String Item.Value = txtlvar.Value Label.Value = txtlvarl.Value SQLstr = SELECT tblLT.[ItemNumber], tblLabelTable.[LabelNumber] FROM tblLT WHERE (((tblLT.[ItemNumber])=[txtvar]) AND ((tblLT.[LabelNumber])=[txtvarl])); CurrentDb.Execute (SQLstr) If Item.Value = [itemnumber] Then MsgBox "Item found" End If If Label.Value = [labelnumber] Then MsgBox "Item Found" End If
Any help is much appreciated.



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks