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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Month on a report

Status
Not open for further replies.

MrMcFestoe

Technical User
Apr 6, 2003
119
GB
I have a report based on a query which asks for the user to input the month they want the report for.

I have tried all ways to display the month the report is based on.

The query looks at 4 fields which could have the month of Jan, March, June, September.

Is there a way of putting the month the user enters on a report?
 
I don't understand.

Do you want to use the month a user types into
a textbox as query critera?

try using a dialog form. (a form with
controls for criteria, and a button to
docmd.open your report) then you set
code in your report.open event to compare
what the dialog form's controls are.
ie: me.recordsource = "select * from t_info
where month = '" & forms!fdlgBigRpt!txt_Month & "'"

..i also reccommend using a combobox with
preset month items.
-g

[flush]
 
A better explanation,

i have a query that asks for the month to be entered, what i am trying to do is take the month that is entered and place it in the header of a report.

The month in the header needs to be the month the query was run for due to the query looks at 4 fields each with a month value in.

Does that sound any better
 
I think Evilmousse's advice is the right one here.

Use a form where the user can insert the month in question, and then you can reference this entry in your query and report by using =[forms]![formname]![txtmonth]

greetz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top