Avoid "Enter Parameters!" AAARRGGHH! (1 Viewer)

timothy.corbin

Registered User.
Local time
Today, 03:57
Joined
Apr 24, 2019
Messages
11
My reports are fed by forms & queries, but when these are run the user only has to enter a date range (as applicable), then press ENTER when it is asking about some equations.
What I would LOVE to figure out is how I can tell it to print a report (go with DeCA 40-331), That command button prints the applicable data in a specific format. The db asks for the dates of the report, then it asks the user to input a series of parameters (I really want to find out how to make those completely disappear). The db then asks the user the SAME questions (date range, then for the parameters) in order to print out a cover sheet. Again, I want to find out how I can make it so those parameter questions are not necessary.

And this is my first attempt at an Access DB in a very, VERY long time. Be gentle!
 

Attachments

  • SALVAGE LOG v2.3.zip
    1.6 MB · Views: 101

theDBguy

I’m here to help
Staff member
Local time
Today, 03:57
Joined
Oct 29, 2018
Messages
21,358
Hi. Sorry I couldn't look at your attachment at the moment, but parameter prompts typically means the information is not available within the data. So, one way to avoid the prompts is make them available to the query or report whenever they are needed. One way to do that is to use a form for user input. So, let's say you have a query with something like [Enter Date], if you instead create a form with a textbox where the user would enter a date, you can change that part in the query to point to the form. For example: Forms!FormName.TextboxName. As long as the form is open with a date already entered by the user, when the query or report opens, it won't ask for the date because it will look for it on the form. Hope it helps...
 

June7

AWF VIP
Local time
Today, 02:57
Joined
Mar 9, 2014
Messages
5,425
I don't use dynamic parameters in query object. I use VBA to build criteria and apply to form or report when opened. Review http://allenbrowne.com/ser-62.html
 

June7

AWF VIP
Local time
Today, 02:57
Joined
Mar 9, 2014
Messages
5,425
The referenced article has very detailed guildelines. But it is, of course, your decision.

You are an astrophysicist? Surely you have some programming knowledge? My daughter has astrophysics degree (second in physics) and she did have to learn programming concepts. Once you have the concepts, learning another language is simple.

I was a bookkeeper/clerk for 25+ years when I went back to school for AS in Geomatics. Had to take Fortran. I have since taught myself several programming languages.

Never too late.
 
Last edited:

timothy.corbin

Registered User.
Local time
Today, 03:57
Joined
Apr 24, 2019
Messages
11
Not an astrophysicist--former Soldier turned green grocer. And the only programming language I have ANY experience on is BASIC, from the days of the Commodore 64!
I'll be reading the article, and if he can figure it out I'll move the whole thing to VBA. Until then, however, I'll be looking for a bandaid.
 

June7

AWF VIP
Local time
Today, 02:57
Joined
Mar 9, 2014
Messages
5,425
The article does mention dynamic parameterized query at the end. Download the sample database.

My first encounter with programming was BASIC back in 1975. Intro to CS - entered code into a robot via number pad :). 30 years later return to school.
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 03:57
Joined
Oct 29, 2018
Messages
21,358
I don't use dynamic parameters in query object. I use VBA to build criteria and apply to form or report when opened. Review http://allenbrowne.com/ser-62.html
I just checked the article, and it describes exactly/better what I was trying to say earlier. Until one gets comfortable with using VBA, this should be a good enough alternative. Me thinks...
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:57
Joined
Sep 21, 2011
Messages
14,050
I *think* it is because you are trying to refer to calculated fields in the query from within the same query.?
I've always calculated them in one query, then referred to them in the next.?

The cover sheet report uses the date parameters, but each query does not know about the parameters of the other.

There was recently a discussion on the ways to present global variables to report and queries.
Some use global variables, some tempvars. I have used tempvars.

So if you calculated your sum totals first in one query, them supply a form to select dates, set the global variables/tempvars to the values of those controls and refer to those in your queries, all the parameter prompts would be gone.

HTH
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 10:57
Joined
Sep 21, 2011
Messages
14,050
You are also grouping by ID, Date, Description, Price etc, which effectively will just give one record per group.?
 

Users who are viewing this thread

Top Bottom