Hi All, I call the LoadRecord sub in the AfterUpdate event of a combobox. The code blows in the Set rs = line telling me Data Type mismatch in criteria expression. The data type is text throughout, even the field FileRef in tbl1 is text.
What am I missing? Thanks!
'Calls the LoadRecord in cboFind AfterUpdate event
Dim strRef As String
strRef = cboFind.Value
frm1.Show
frm1.LoadRecord strRef
Sub LoadRecord(strFile As String)
strSQL = "SELECT * FROM tbl1"
strSQL = strSQL & " WHERE tbl1.FileRef = " & strFile
Set rs = Conn.Execute(strSQL)
What am I missing? Thanks!
'Calls the LoadRecord in cboFind AfterUpdate event
Dim strRef As String
strRef = cboFind.Value
frm1.Show
frm1.LoadRecord strRef
Sub LoadRecord(strFile As String)
strSQL = "SELECT * FROM tbl1"
strSQL = strSQL & " WHERE tbl1.FileRef = " & strFile
Set rs = Conn.Execute(strSQL)