Log in

View Full Version : Is this Weird Or Am I Missing Sumthing?


Firestorm
Aug 17, 2009, 03:36 AM
Here is my code...

'Works Fine Adding Items
Private Sub Command1_Click()
If Text2.Text = "" Then
MsgBox "Please Enter Item Name"
Else
Data1.Recordset.AddNew
End If
End Sub

'Works Fine Updating Items
Private Sub Command2_Click()
Data1.Recordset.Update
End Sub

'This Is The Problem
Private Sub Command3_Click()
Data1.Recordset.Find ("Barcode = 'Text5.text'")
End Sub

If i Type 123456789 in the textbox, it returns blank textboxs (There should beItem Code and Stock)

However, if i change the code to this

Private Sub Command3_Click()
Data1.Recordset.Find ("Barcode = '123456789'")
End Sub

Then it returns all information regarding that Item?

Please help me, I need it to locate the item from the Txtbox at runtime, But it will only do it ifthe number required is built in the code??