I am using DAO or the data control for working with the database. I have two text boxes – txtItemNumber and txtDescription and a command button – cmdFind on my form. And, I was trying to search for a part item number, but I got the run-time error – it says that ‘3077’: Syntax error (missing operator) in expression. Please help me...Thank you.

The user enters a Item Number and clicks on the Fund button to get the Item Number’s record.

Dim db As Database
Dim rs As Recordset
Dim num1 As Integer
Dim target As String

Private Sub cmdFind_Click()
Data1.DatabaseName = App.Path & "\Ampem.mdb"
Data1.RecordSource = "Select * FROM Inventory"

num1 = txtItemNumber.Text
if num1 = “” then
exit sub
else
target = "Item Number = '" & num1
Data1.Recordset.FindFirst target
If Data1.Recordset.NoMatch Then
MsgBox "no found"
Exit Sub
Else
MsgBox "found"
txtItemNumber.Text = num1
Exit Sub
End If
End if
End Sub

[This message has been edited by nicky (edited 12-16-1999).]