Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date appears on first page but not following pages

Status
Not open for further replies.

juliesmomma

Technical User
Jun 3, 2002
36
0
0
US
I have a parameter form (Report Dialog) where the user enters the date range in 2 text fields.

In the header of the report I have 2 text fields for the date range.
The From date field has this code:
=[Forms]![Report Dialog]![txtFromDate]
The Thru date field has this code:
=[Forms]![Report Dialog]![txtFromDate]

I also have this in the query the report is based upon for the date range:
Between [Forms]![Report Dialog]![txtFromDate]And [Forms]![Report Dialog]![txtFromDate]

When the report is run to preview, the date range appears correctly on the top of the first page of the report but appears with #Name? on the rest of the pages?

If I need to supply more information, please let me know.
Thanks for any assistance you can give me. I've tried to search the site for answers but I just can't find anything that fits my situation.

Thanks a bunch,
April
 
Is your form Report Dialog a dialog box? Does the report close your form? Are you using Report Header, or Page Header in your report?
 
Sounds like you are closing the original form somewhere in the process.

The best way to handle your original form is to HIDE it using the On Open event of your report. Then use the On Close event to close the parameter form
 
Let's see if I can answer all the questions.

1) Report Dialog is a Popup form.

2) On my Report dialog form, when I click the Run Report button, the first item of business is for the click event of that button is Me.Visible=False. I have code in my report for Report_Close() event to close the Report Dialog form.

3) I am using a Page Header.

Does that help? :)
 
I know you said it appears correctly once, but I would check all your spellings, the example you give above lists the same field twice.
 
How ever you cause the Report Dialog to open as a Popup form, have that procedure do the close of the Report Dialog rather than the report itself doing the form close. You say the form is a Popup form. Is it also Modal? It needs to be.

If that does not work, then we will look deeper.

What I do in my databases (consider this a Tip):
I have a form that is always hidden, that is opened when the first form (frmMainMenu) is opened. On my hidden form, I have every field (I add a new one as needed) necessary to run any report or query. For example, these fields on your popup form that are needed by the report, I write them to my hidden form and always reference the needed data off this hidden form. This has three big advantages. (1) The data is always there for me to be able to see it during development. (2) During testing of a report or query, the popup form is not needed, as the values are on my hidden form. (3) I don't need to worry about when I close my popup form, as the data is written to my hidden form and used from there.

Vic
 
Thanks Knicks. I did check my spelling and it is correct. Sorry for the type-o in my thread. Before I did this thread I did find that I had a type-o in one of those fields but that didnt' fix the problem I'm having.

Vic
I did not have my Report Dialog form set to Modal. I did that but that didn't work either. I will definitely look work on the tip you gave me. I'm not sure I understand how it works but it does make sense.

Thanks so much!
April
 
April,

As a first step, create a form with the same textbox fields on it that you have in your popup form. When you click the "continue" button (or whatever the name is), write all the field values from your popup form into the hidden form. Then refer to the hidden form instead of the popup form in your query and in the report. Be sure the hidden form is open! It does not need to be hidden during your testing.

Hope this makes it a little more simple.
Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top