Query Parameter --maybe not

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
7,475
Office Version
  1. 365
Platform
  1. Windows
I am generating a group of queries that require expressions that do not have to be visible in the results. In setting up the expressions, I have given them an alias by replacing the Expr1: with a rational name such as Adj Field. When I unclick the box to show the "Adj Field" in the query results, Access deletes it from the Expression box and I am left with only the formula(expression). I have a second Expression that is visible and relies on the first Expression, using the alias 'Adj Field' in the second expression. When I click on the run Query, I get a parameter like box that appears to be looking for input -- the paramter like box has the "Adj Field" above the input area.

What can I do to fix this? Eliminate the parameter like box and still maintain the alias in the expression. Am I over reaching. I would think that this would be possible but not sure how to solve the issue short of having extraneous information presented in the query results.

Thanks much
Alan
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
66,939
Office Version
  1. 365
Platform
  1. Windows
Yes, I have run into that problem from time to time also. Access does not seem to like it if you have nested calculations in a query, and one of the underlying calculations is not visible.

Here are a few methods I used to get around it.

1. Make all the underlying calculations visible. If the end result is a Form or Report, you don't need to show it there, so it shouldn't matter if it is visible in the Query.

2. If your end result is the Query or an Export, you could always created another query that uses this query as its source and only display the fields you want (so what you really have is an underlying "calculation" query and a final "results" query).
 
Upvote 0

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
7,475
Office Version
  1. 365
Platform
  1. Windows
Hey Joe;
Just made the first one as you described and it was very slick. I've been killing myself on this for a couple of days because it has some parameter features that the EU needs to complete at the run request time. This makes it work great. Thank you.
 
Upvote 0

Forum statistics

Threads
1,190,898
Messages
5,983,460
Members
439,843
Latest member
PlanetFitness

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top