ardy
Registered User.
- Local time
- Yesterday, 16:27
- Joined
- Sep 24, 2012
- Messages
- 98
Folks I am going crazy:banghead:.........Can't figure this out....
It runs but when it gets to MsgBox it gives me the error.
Code:
Dim Num As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Num = Me.Well_ID ' Reading an String from a field in the form
MsgBox "Form WellID ----> " & Num ' making sure I am reading the string
strSQL = "SELECT [Assets.Well_ID] " & "From Assets " & _
"WHERE [Assets.Well_ID] =" & Chr$(39) & Num & Chr$(39)
Debug.Print strSQL
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)
MsgBox rs
It runs but when it gets to MsgBox it gives me the error.