bumblingidiot
New member
- Local time
- Today, 16:07
- Joined
- Dec 1, 2011
- Messages
- 4
First let me say that I am really a novice at all of this. Most of what I know about Access I have learned by doing.
I currently have a few forms set up where the end user selects from a drop down box, that info is fed to the query and then into the report header. This was working fine in 2003 but we just upgraded to 2007 and now it is not.
Here is an example of what I currently have -
The end user chooses a status from the combo box then clicks the "run" button which has this code:
I know what is happening is the form is closing without that information being communicated to the final report, but I'm not sure how to fix it. Some of what I tried:
I moved the code to close the form to the close action of the report. Fixed the header issue but then me.undo didn't work and a new record was created every time a report was run.
I tried to unbound the form but wasn't having any luck being able to do that and still allow selection of the combo box items.
I put a me.undo into the "on close" of the form that didn't work.
Hopefully this makes sense and someone can point me in the direction of possibilities to fix this issue.
Thank you so much for your time.
I currently have a few forms set up where the end user selects from a drop down box, that info is fed to the query and then into the report header. This was working fine in 2003 but we just upgraded to 2007 and now it is not.
Here is an example of what I currently have -
The end user chooses a status from the combo box then clicks the "run" button which has this code:
Private Sub cmdRunCorrespondencebyApprovalStatus_Click()
DoCmd.OpenReport "rptCorrespondencebyApprovalStatus-AllProjects", acViewPreview
Me.Undo
DoCmd.Close acForm, "frmChooseApprovalStatus-ReferenceforReport"
End Sub
In the query I am simply using this criteria:[Forms]![frmChooseApprovalStatus-ReferenceforReport]![cboApprovalStatus]
In the Report I have a label:=Forms![frmChooseApprovalStatus-ReferenceforReport]!cboApprovalStatus
When it opens in Print Preview it is fine. If you actually print it or change the view to report view there is nothing there.I know what is happening is the form is closing without that information being communicated to the final report, but I'm not sure how to fix it. Some of what I tried:
I moved the code to close the form to the close action of the report. Fixed the header issue but then me.undo didn't work and a new record was created every time a report was run.
I tried to unbound the form but wasn't having any luck being able to do that and still allow selection of the combo box items.
I put a me.undo into the "on close" of the form that didn't work.
Hopefully this makes sense and someone can point me in the direction of possibilities to fix this issue.
Thank you so much for your time.