X
xavier
Hello
I got the task of converting some DB's I didn't write and
all went well except for one issue I need help with.
There is a form you go into and check the boxes of the
tests you need to request then click on a preview button
which gives you a printable report of those tests, this
action of clicking on the request button (preview form to
print) should automaticaly place new check boxes only on
those records which were checkd off before so they don't
come up again in the future and get duplicated etc.
Below is the code the previous writer used in 97 and it
works in 97 but not in XP.
The error comes up highlighting the dbs in the line that
says dbs.execute "update tests"
Is there an easy way to correct this so it works, in the
mean time I have them checking them manualy till I can
get it fixed.
Any help is greatly appreciated
Thank you
Xavier
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click
Dim stDocName As String
stDocName = "SPECIMEN REQUISITION FORM - Group H"
DoCmd.OpenReport stDocName, acPreview
dbs.Execute "UPDATE Tests " _
& "SET SpecimenRequestClosed = TRUE " _
& "WHERE SpecimenRequest = TRUE " _
& "AND SpecimenRequestClosed = FALSE;"
dbs.Close
Exit_Command28_Click:
Exit Sub
Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click
End Sub
I got the task of converting some DB's I didn't write and
all went well except for one issue I need help with.
There is a form you go into and check the boxes of the
tests you need to request then click on a preview button
which gives you a printable report of those tests, this
action of clicking on the request button (preview form to
print) should automaticaly place new check boxes only on
those records which were checkd off before so they don't
come up again in the future and get duplicated etc.
Below is the code the previous writer used in 97 and it
works in 97 but not in XP.
The error comes up highlighting the dbs in the line that
says dbs.execute "update tests"
Is there an easy way to correct this so it works, in the
mean time I have them checking them manualy till I can
get it fixed.
Any help is greatly appreciated
Thank you
Xavier
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click
Dim stDocName As String
stDocName = "SPECIMEN REQUISITION FORM - Group H"
DoCmd.OpenReport stDocName, acPreview
dbs.Execute "UPDATE Tests " _
& "SET SpecimenRequestClosed = TRUE " _
& "WHERE SpecimenRequest = TRUE " _
& "AND SpecimenRequestClosed = FALSE;"
dbs.Close
Exit_Command28_Click:
Exit Sub
Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click
End Sub