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

need parameter when open report 1

Status
Not open for further replies.

beneidas

Programmer
Jan 28, 2005
6
CA
hi all,

I have a report with the query1 in the control source

I have this textfield:
=COUNT([query2]![Date])

but when I open the report I got a msgbox want I enter the parameter for query2!Date

I suppose is cause by my second query but I dont know how to fix it.

can anyone help plz?
 
= Count([Date])

That is most likely what you are looking for. Reports don't like the full names of things like queries do.

Also of note is Date is a function so you need to be extra careful to always inculde the square brackets. If its not to late in the design process changing it to something like invoicedate, orderdate or dateRecieved is highly recommended.
 
If Query2!Date is not a table/field in your report's record source then this will never work. You will need to use something like:
=DCount("[Date]","Query2")


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
thx a lot guy's you got a star from me!!!!
 
I got a another problem I put this as scource in my generator expression of my textfield

=CpteDom("[Date]";"[annuel_date_02]")
=Dcount("field";"query2")

when I enter in my report in my textfield it write error

anyone know why?
 
I assume CpteDom() is the same as DCount()? Please don't presume some of us understand other languages.

What is the error?
What is Annuel_date_02?
Does Annuel_Date_02 have a sql view you would like to share?
What is the name of the text box?
Is there a field "Date" in the query/table?

What have you done to trouble-shoot?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top