Report Dialog Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report menu form that opens a particular report depending on the
selection made from the listbox control on the form. Before the report
actually opens, a report dialog box opens to allow the user to enter criteria
for the report. How can I program the caption of a text box on my report
dialog form so that it reflects the report that the user is entering
criterial for?
 
I have a report menu form that opens a particular report depending on the
selection made from the listbox control on the form. Before the report
actually opens, a report dialog box opens to allow the user to enter criteria
for the report. How can I program the caption of a text box on my report
dialog form so that it reflects the report that the user is entering
criterial for?

Add an unbound control to the report header.
Set it's control source to something like this:
= "For sales on " & forms!FormName!ControlName

Change the form name and control name to whatever the actual names
are.
The form must remain open when the report runs.
 
I don't think that will work.

1. User selects report from form called Report Menu.
2. Code behind this form opens the selected report.
3. In the report_load event, a macro is run that opens a form called Report
Dialog so that the user can enter criteria for the report.
4. After criteria is entered, the user clicks "ok" and the report is then
opened.

The actual report is not opened until the criteria has been entered. I need
the form Report Dialog to display which report the user has selected so that
they will know what criteria they must enter.

Is there another way?
 
I don't think that will work.

1. User selects report from form called Report Menu.
2. Code behind this form opens the selected report.
3. In the report_load event, a macro is run that opens a form called Report
Dialog so that the user can enter criteria for the report.
4. After criteria is entered, the user clicks "ok" and the report is then
opened.

The actual report is not opened until the criteria has been entered. I need
the form Report Dialog to display which report the user has selected so that
they will know what criteria they must enter.

Is there another way?

It is helpful to include the relevant portion of any previous reply to
which you are responding.
This message doesn't tell me what my previous message said.
If it wasn't my message, I would not have looked it up!

I did misread your question, and thougt you wanted to display the
parameter in the report, not the report name on the form.

The OpenForm method has arguments, one of which is the OpenArgs.
Code the Report's Open event:

DoCmd.OpenForm "FormName", , , , , acDialog, Me.Name

Code the Form's Load event:

If Not IsNull(Me.OpenArgs) Then
Me.Caption = "The Selected Report is " & Me.OpenArgs
End If

If you are actually using a macro, use code instead.
Macro's do not have the OpenArgs argument available.
 
Thanks - I'll try that.

Sorry about the last message. I don't know what I did - I thought that I
was replying correctly.

Arlene
 
Back
Top