B
Bill R via AccessMonster.com
I use the following code:
With Forms!Drawing_Sign_Off_Form.Form
If .Controls("chkSTX") Then
strSQL = strSQL & "WHERE DOC_TYPE=""STX""" & vbCrLf
Else
strSQL = strSQL & "WHERE DOC_TYPE<>""STX""" & vbCrLf
End If
strSQL = strSQL & "ORDER BY Status.[Recovery Date], IPT_NO, DWG_NO;"
qdf.SQL = strSQL
.Requery
End With
To change the Where clause of a query underlying a form. The problem is, the
form just won't change the recordset to reflect the query results. I check
the query after running the program and it's recordset is changed, but the
form still shows the recordset which the query no longer returns. I tried
hitting F9 and Shift F9, but nothing happens. The chkbox is unbound. This
code runs on after update of the chkbox and the onload event of the form.
With Forms!Drawing_Sign_Off_Form.Form
If .Controls("chkSTX") Then
strSQL = strSQL & "WHERE DOC_TYPE=""STX""" & vbCrLf
Else
strSQL = strSQL & "WHERE DOC_TYPE<>""STX""" & vbCrLf
End If
strSQL = strSQL & "ORDER BY Status.[Recovery Date], IPT_NO, DWG_NO;"
qdf.SQL = strSQL
.Requery
End With
To change the Where clause of a query underlying a form. The problem is, the
form just won't change the recordset to reflect the query results. I check
the query after running the program and it's recordset is changed, but the
form still shows the recordset which the query no longer returns. I tried
hitting F9 and Shift F9, but nothing happens. The chkbox is unbound. This
code runs on after update of the chkbox and the onload event of the form.