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

Report's 1

Status
Not open for further replies.

UAMI

Programmer
Dec 10, 2003
28
PT
Openreport
I have a form where i introduce the parameter's needed for the execution of a report.
However when i do the openreport comand, a new window apear's to obtain the parameter's that i already introduced in my form. I saw in the help that it's possible to put openargs, but i cant's do it function.

stDocName = "MAPA_DET_FUNCAOrpt3"

stWhereCond = "(FACTURAS.ANMEFA>=[Form]![MAPA_DET]![AnoMesDe]) and (FACTURAS.ANMEFA<=[Form]![MAPA_DET]![AnoMesA])"


DoCmd.OpenReport stDocName, acNormal, , , , stWhereCond



Any suggestions????

 
Hallo,

Try:

stWhereCond = "(FACTURAS.ANMEFA>=" & [Form]![MAPA_DET]![AnoMesDe] & ") and (FACTURAS.ANMEFA<=" & [Form]![MAPA_DET]![AnoMesA] & ")"
if FACTURAS.ANMEFA is numeric or
stWhereCond = "(FACTURAS.ANMEFA>=""" & Forms!MAPA_DET!AnoMesDe & """) and (FACTURAS.ANMEFA<=""" & Forms!MAPA_DET!AnoMesA & """)"
if FACTURAS.ANMEFA is text/memo

-Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top