Hi Johnly,
Hi vb5prgrmr,
Yah the name of the text box is where iam entering the barcode. And the name of the data control is actually Store i just forgot to change it when i posted the thread,.
This is actually a POS system, u know when a cashier enters a barcode/itemcode and display everything associated to that item,, thats exactly what i want to know how..
i tried the following code though to connect/open my database
<code>
Option Explicit
Private Sub cmdAccept_Click()
Dim cn As New ADODB.Connection
Dim strCNString As String
Dim RS As New ADODB.Recordset
Dim Txt As String
On Error GoTo ErrHandler
'Connect to database
strCNString = "Data Source=Store.mdb"
cn.Provider = "Microsoft Jet 4.0 OLE DB Provider"
cn.ConnectionString = strCNString
cn.Properties("Jet OLEDB

atabase Password") = "sakaria"
cn.Open
'Open recordsource
With RS
.Open "Select * from items where barcode='" & txtcode.Text & "' , cn, adOpenDynamic, adLockOptimistic
End With
ExitHere:
Exit Sub
ErrHandler:
MsgBox Err.Number & " " & Err.Description, vbCritical, "Sale ..."
cn.Close
End Sub
</code>
it worked well with my log in form but unfortunately not with the form in discussion.Is there maybe something wrong with the code?
vb5prgrmr, i tried to do wat u instructed me to do but unfortunately it didnt work, when i opened its telling me unrecognized database format.. but any how i checked the data wizard on the net how it works on the folowing link
http://msdn.microsoft.com/en-us/library/aa291437%28VS.71%29.aspx