How to run a report while just entering parameters once? (1 Viewer)

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
So which queries and reports are they?

Final report including all sub reports = "Merged1"

The subreports and queries used in each are:

"Final 1" report from "qry_COMPLETEDDATES" from table "ETC_1stAug2014_CompletedDates"
"Final 2" report from "qry_COMPLETEDDATES" from table "ETC_1stAug2014_CompletedDates"
"Final 3" report from "qry_COMPLETEDDATES" from table "ETC_1stAug2014_CompletedDates"
"qry_cancellations" report from "qry_Cancellations" from table "CancellationsIn12Month"
"qry_non-attends" report from "qry_non-attends" from table "NonAttendIn12Month"
"qry_Other Qualifications1" report from "qry_Other Qualifications"
from table "Other_L&D_Activity_ReviewYear" .
"Final41" is a generic page but due to it appearing many times in print preview so I changed it to have a record source of "SELECT ETC_1stAug2014_CompletedDates.ClientID FROM ETC_1stAug2014_CompletedDates WHERE (((ETC_1stAug2014_CompletedDates.ClientID) Like [forms]![Form1]![ClientID_Label])); "

However, that last bit now looks wrong :/

Jim
 

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
WHERE (((ETC_1stAug2014_CompletedDates.ClientID) Like [forms]![Form1]![ClientID_Label])); "

However, that last bit now looks wrong :/
Fix the last bit and run it because that was the same thing I fixed in the db I sent you.
 

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
If you re-read my post, I mentioned that I only changed qry_COMPLETEDATES and also said that you should replicate that across the other queries.
 

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
I did do, just not the record source part of "Final 41". however, this still works with the old code in either way.

I have changed the record source to match what you did in qry_COMPLETEDDATES now. It works now by selecting the client and then pressing run report.

Can I ask, how did you get that to work without having to edit the code?
 
Last edited:

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
You're confusing things. What old code are you talking about?
 

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
It was still looking for "ClientID_Label" in "Merged41" report.
 

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
Alright, so all working now without opening the queries first?
 

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
Yes, thank you very very much. I've also edited the form1 so it is a combo box and it works fine also. Did you have to write any code in the backstage for this or was it just getting criteria right?

Thanks,

J
 

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
Nope, only changed the criteria in the query. The one you had before was pointing to a label.
 

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
Ah ok. my colleague said that would work so that is what they set up.

Since my colleague is now off for 9 months the company has agreed I can go on an Access training course, starting next week so I will improve on my pretty weak Access skills.
 

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
So you had your colleague to help all this while and you didn't employ his/her brain?

I'm sure you would benefit from the course. :)
 

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
My colleague said they knew what they were doing! When they asked me "what is that line between the 2 tables in a query" I decided he wasn't much better than me! :)
 

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
The join line that defines relationships between 2 tables...I thought I had issues!
 

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
Yes, that's basic Access.

Anyway, good luck with your course.
 

jimtimber

Registered User.
Local time
Today, 22:31
Joined
Apr 25, 2014
Messages
118
Hi vbaInet,

This is all set up and on the development database, works a treat. I've just tested it on the server where the users get the split version of the database and it doesn't show the report when I click preview? This works on my side though.

J
 

vbaInet

AWF VIP
Local time
Today, 22:31
Joined
Jan 22, 2010
Messages
26,374
What do you actually mean? The report doesn't load or the report loads but it's blank?
 

Users who are viewing this thread

Top Bottom