G
Guest
Private Sub SetForm_Click()
Dim sqlGroup As String
Dim i As Integer
Set rs = New ADODB.Recordset
Set cn = CurrentProject.Connection
i = 1
sqlGroup = "SELECT tempJobTitles.Rank, tempJobTitles.txtJobTitle,
tempJobTitles.FirstQuart" & _
" FROM tempJobTitles WHERE (((tempJobTitles.Rank)='" & i & "'));"
rs.Open sqlGroup, cn, adOpenStatic, adLockOptimistic
I am getting the following error:
Data Type Mismatch In Critera Expression
The tempJobTitles.Rank is a long integer. I am guessing that it has to do
with the i in the SQL, but I am not sure how.
Thoughts?
Thanks in advance!
PJ
Dim sqlGroup As String
Dim i As Integer
Set rs = New ADODB.Recordset
Set cn = CurrentProject.Connection
i = 1
sqlGroup = "SELECT tempJobTitles.Rank, tempJobTitles.txtJobTitle,
tempJobTitles.FirstQuart" & _
" FROM tempJobTitles WHERE (((tempJobTitles.Rank)='" & i & "'));"
rs.Open sqlGroup, cn, adOpenStatic, adLockOptimistic
I am getting the following error:
Data Type Mismatch In Critera Expression
The tempJobTitles.Rank is a long integer. I am guessing that it has to do
with the i in the SQL, but I am not sure how.
Thoughts?
Thanks in advance!
PJ