Will Cook
12-19-2003, 10:05 AM
The following worked for over a week, on many different forms, yesterday it just quit working in Access 2002:
Dim thisTestKey As Long
Dim strSql As String
strSql = "PowerAndCurrent.TestKey = " & thisTestKey
DoCmd.OpenForm FormName:="frmDetailPAC2575",
WhereCondition:=strSql, WindowMode:=acDialog
Whenever I execute the code now, I get queried for the value of TestKey.
The following code still works OK for opening a different form:
Dim strSql As String
strSql = "TestTime Between #" & myStartDate & "# and #" &
myEndDate & "#"
DoCmd.OpenForm FormName:="frmADCDACCheck",
WhereCondition:=strSql, WindowMode:=acDialog
The only differences I know of are:
1. thisTestKey is numeric, while myStartDate and myEndDate are dates.
2. TestKey is indexed while myStartDate and myEndDate are not.
Is there something special I need to do with integer values versus dates and text??? Did I somehow screw up a setting yesterday which would cause this?? Have I Mad Access 2002 disease?
Dim thisTestKey As Long
Dim strSql As String
strSql = "PowerAndCurrent.TestKey = " & thisTestKey
DoCmd.OpenForm FormName:="frmDetailPAC2575",
WhereCondition:=strSql, WindowMode:=acDialog
Whenever I execute the code now, I get queried for the value of TestKey.
The following code still works OK for opening a different form:
Dim strSql As String
strSql = "TestTime Between #" & myStartDate & "# and #" &
myEndDate & "#"
DoCmd.OpenForm FormName:="frmADCDACCheck",
WhereCondition:=strSql, WindowMode:=acDialog
The only differences I know of are:
1. thisTestKey is numeric, while myStartDate and myEndDate are dates.
2. TestKey is indexed while myStartDate and myEndDate are not.
Is there something special I need to do with integer values versus dates and text??? Did I somehow screw up a setting yesterday which would cause this?? Have I Mad Access 2002 disease?