G
Guest
I am opening a ADO recordset based on a SQL statement. I have no problems
until I add one particular field. The field is a text field, based on a
table in the existing query. It is "tblAccounts.Section". I dont belive
there are limitations in terms of number of fields in an ado recodset, so I
cant understand why the open method fails when i add this field. The field
in its respective table is based on a lookup to another table, but
"tblAccounts.AcctResp" is also. Any suggestions? Thanks in advance
Do Until rsResp.EOF
intResp2 = rsResp.Fields(0).Value
strDataSQL = "SELECT tblAccounts.Account, tblAccounts.AcctDescr, " _
& "tblAccounts.AcctResp, " _
& "tblGLData.Period1, tblGLData.Period2,
tblGLData.Period3, " _
& "tblGLData.Period4, tblAccounts.Section " _
& "FROM tblAccounts INNER JOIN tblGLData ON " _
& "tblAccounts.Account = tblGLData.Account " _
& "WHERE (((tblAccounts.AcctResp) =" & intResp2 &
")) " _
& "ORDER BY tblAccounts.Account;"
'Open recordset
rsData.Open strDataSQL, cnn1, adOpenKeyset
until I add one particular field. The field is a text field, based on a
table in the existing query. It is "tblAccounts.Section". I dont belive
there are limitations in terms of number of fields in an ado recodset, so I
cant understand why the open method fails when i add this field. The field
in its respective table is based on a lookup to another table, but
"tblAccounts.AcctResp" is also. Any suggestions? Thanks in advance
Do Until rsResp.EOF
intResp2 = rsResp.Fields(0).Value
strDataSQL = "SELECT tblAccounts.Account, tblAccounts.AcctDescr, " _
& "tblAccounts.AcctResp, " _
& "tblGLData.Period1, tblGLData.Period2,
tblGLData.Period3, " _
& "tblGLData.Period4, tblAccounts.Section " _
& "FROM tblAccounts INNER JOIN tblGLData ON " _
& "tblAccounts.Account = tblGLData.Account " _
& "WHERE (((tblAccounts.AcctResp) =" & intResp2 &
")) " _
& "ORDER BY tblAccounts.Account;"
'Open recordset
rsData.Open strDataSQL, cnn1, adOpenKeyset