0

hye
here is my code but it is not working plz help me.

FRd = txtBCode.Text
On Error Resume Next
Set Mydb = OpenDatabase("E:\Projects\TS\database\MyDb.mdb")
Set Myrs = Mydb.OpenRecordset("SELECT * FROM ItemEntry  Where[Barcode]= "&FRd, dbOpenDynaset)
' other data have to retrive.
If Not Myrs.EOF = True Then
txtINameS.Text = Myrs("ItemNameSize").Value
'txtPrice.Text = Myrs("ItemPrice").Value
Else
MsgBox "No Record Foun.Try again"
Exit Sub
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by P.manidas
0

Try this 4 lines of code instead of line nos. of your codes 7 to 11

txtINameS.Text = Myrs("ItemNameSize").Value
If Myrs.RecordCount = 0 then
MsgBox "No Record Foun.Try again"
Endif

Edited by P.manidas: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.