disabling criteria prompts (1 Viewer)

Gr3g0ry

Registered User.
Local time
Yesterday, 23:13
Joined
Oct 12, 2017
Messages
163
i have a report that can be called from 2 forms. it requires two values from each form.

it worked perfectly previously.

now whenever i try to call a report, it the querry for the report is prompting for all the criteria values specified in the query. Previously, its just get the values from the form and run the report, now its prompting for values for the form calling the report, as well as the form that isnt calling the report.

i hope ive sufficiently explained my issue.
my question now is how can i avoid all those prompts ??

my reports still work and display all the correct information after pressing OK on all prompts, i just dont want all the prompts coming up.
 

jdraw

Super Moderator
Staff member
Local time
Today, 02:13
Joined
Jan 23, 2006
Messages
15,379
??? What has changed? You say it worked Previously --previously to what?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:13
Joined
May 7, 2009
Messages
19,231
you need that the two form be open to run the report otherwise you must out code on the open event of the report and check whether those forms are open and set the default parameter when their not. then you set the reports recordsource.
 

Gr3g0ry

Registered User.
Local time
Yesterday, 23:13
Joined
Oct 12, 2017
Messages
163
nothing changed. i was away for 3 weeks and i returned and resumed working on my project.

when i said it worked previously ... i meant that it worked without showing the prompts. i changed nothing. i even reverted to the working version i had sent my instructor.

now its prompting me. Both versions are prompting me.

frmAddNewPartner and frmAdminPartner are my two forms. they call the same report to display the same information.

the report needs two values PartnerID & CustomerID.

each form provides both values. when im using frmAddNewPartner it keeps asking for values from frmAdminPartner and vice versa.

arnelgp my boss .... "you need that the two form be open to run the report otherwise you must out code on the open event of the report and check whether those forms are open and set the default parameter when their not. then you set the reports recordsource." ???

clueless as to what u mean ... can u speak english bruh ? :D my project is set up that only one form at a time can be opened.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:13
Joined
May 7, 2009
Messages
19,231
no, i only speak martian.
 

Gr3g0ry

Registered User.
Local time
Yesterday, 23:13
Joined
Oct 12, 2017
Messages
163
"...out code on the open event of the report and check whether those forms are open and set the default parameter when their not. then you set the reports recordsource. " im not sure how to do this .... point me to an example or something to use as a guide please.

im baffled becuz it worked perfectly before now man.
 

Gr3g0ry

Registered User.
Local time
Yesterday, 23:13
Joined
Oct 12, 2017
Messages
163
figured out what u meant, found the On Open event for report, (didnt even kno u could code a report), now im trying to ascertain how to identify the open form, any help in this regard ?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:13
Joined
Feb 19, 2002
Messages
43,223
Rather than having the report attempt to figure out what form opened it, why not use the WHERE argument of the OpenReport method. That way, it doesn't matter what form opens the report since the criteria is applied by Access directly.
 

Users who are viewing this thread

Top Bottom