This is my first Access 2003 VBA, i was editing a project deals with 2 databases, the 1st one is the same as the project and another external DB, in the Orders screen:
- the Orders form opens multiple queries to retrieve data from and display it on.
- I added textbox to the form and on the Click event i typed this code :
Private Sub Text432_Click()
'EVRY1FALLS
If CN.State = 1 Then CN.Close
CN.Open ("provider = microsoft.jet.oledb.4.0 ; data source = C:\StoneEdge\ulbbak.mdb")
If RS1.State = 1 Then RS1.Close
RS1.CursorLocation = adUseClient
RS1.Open "Select * From ORDERS where customerID = '" & fldCustomerID & "'", CN, adOpenDynamic, adLockOptimistic
Me.Text432 = RS1!Name
End Sub
When i try the project and click in the textbox i get the error message :
Quote
Data Type Mismatch in Criteria Expression
.... i dunno what is wrong or how to solve it !

New Topic/Question
Reply




MultiQuote




|