Hi
I have the following code in a form's ON LOAD property
For the 2 records that I'm expecting to be selected in this dynaset, tblGaps.Gap_Status does equal 1 and both "tblGaps.Conversion" and "[Forms]![frmSignOn]![ctlConversion]" are text.
I get an error message that the expected value was 1. When I open the code and hold the mouse cursor over "Set rs = db.OpenRecordset(sql, dbOpenDynaset)" the mouseover shows "dbOpenDynaset=2".
What am I doing wrong?
Jim DeGeorge![[wavey] [wavey] [wavey]](/data/assets/smilies/wavey.gif)
I have the following code in a form's ON LOAD property
Code:
Dim db As dao.Database, rs As dao.Recordset, sql As String
sql = "SELECT Count(tblGaps.GapID) AS vCount FROM tblGaps "
sql = sql & "WHERE tblGaps.Gap_Status = 1 And tblGaps.Conversion = '" & [Forms]![frmSignOn]![ctlConversion] & "';"
Set db = CurrentDb()
Set rs = db.OpenRecordset(sql, dbOpenDynaset)
For the 2 records that I'm expecting to be selected in this dynaset, tblGaps.Gap_Status does equal 1 and both "tblGaps.Conversion" and "[Forms]![frmSignOn]![ctlConversion]" are text.
I get an error message that the expected value was 1. When I open the code and hold the mouse cursor over "Set rs = db.OpenRecordset(sql, dbOpenDynaset)" the mouseover shows "dbOpenDynaset=2".
What am I doing wrong?
Jim DeGeorge
![[wavey] [wavey] [wavey]](/data/assets/smilies/wavey.gif)