I have written the following code:
Dim db As Database
Dim rst As Recordset
Dim strSQL As String
Dim WO As String
WO = Me![WO#]
Set db = CurrentDb
strSQL = "Where [FieldWO] = " & WO
Set rst = db.OpenRecordset("Select * from [tbl Field Input] " & strSQL)
I get a "Data Mismatch in Criteria Expression everytime I run this code. [FieldWO] is set up as text. Any help would be appreciated!
Thanks,
Bill Heath
Dim db As Database
Dim rst As Recordset
Dim strSQL As String
Dim WO As String
WO = Me![WO#]
Set db = CurrentDb
strSQL = "Where [FieldWO] = " & WO
Set rst = db.OpenRecordset("Select * from [tbl Field Input] " & strSQL)
I get a "Data Mismatch in Criteria Expression everytime I run this code. [FieldWO] is set up as text. Any help would be appreciated!
Thanks,
Bill Heath