crescent-centre
Registered User.
- Local time
- Today, 23:07
- Joined
- Feb 28, 2003
- Messages
- 30
I have a form which is the main data entry for a document control db. Some of the documents have a status of approved and some not approved (also a few other possibilities).
If I open a report in design view I can filter the report with a line
docstatus like "approved".
I have added a button on the form which I want to do the above, i.e. display just the approved docs. Using previous help from this site I have added the following code.
stDocName = "Report1"
DoCmd.OpenReport stDocName, acViewDesign
Report_report1.Filter docstatus Like "approved"
Report_report1.FilterOn = True
Report_Report1.Text1.Visible = False
DoCmd.Close acReport, "rptPage1", acSaveYes
DoCmd.OpenReport "report1", acViewPreview
I think that it is just the formatting on line 3 that is wrong (or maybe not)
Can anyone help?
If I open a report in design view I can filter the report with a line
docstatus like "approved".
I have added a button on the form which I want to do the above, i.e. display just the approved docs. Using previous help from this site I have added the following code.
stDocName = "Report1"
DoCmd.OpenReport stDocName, acViewDesign
Report_report1.Filter docstatus Like "approved"
Report_report1.FilterOn = True
Report_Report1.Text1.Visible = False
DoCmd.Close acReport, "rptPage1", acSaveYes
DoCmd.OpenReport "report1", acViewPreview
I think that it is just the formatting on line 3 that is wrong (or maybe not)
Can anyone help?