Different type of parameter query

P

PASGEN

How can I create a query that prompts a user for the fields they want to
display. I want to create this query which will link many fields but I want
my users to be able to select only those fields relevant to the information
they need.

Any help will be greatly appreciated.
 
K

KARL DEWEY

I am think you might have a spreadsheet. What is your table structure?
Post field names and datatype with sample data.
 
J

John W. Vinson

How can I create a query that prompts a user for the fields they want to
display. I want to create this query which will link many fields but I want
my users to be able to select only those fields relevant to the information
they need.

Any help will be greatly appreciated.

In a properly designed table this issue shouldn't come up: it sounds like
you're "storing data in fieldnames". What is the structure of your table? What
fields are you prompting the user for?

The answer to the question as posted is... you can't, not with a Parameter
query. You'll need to build a SQL string in code.
 
P

PASGEN

The query I have was designed in MS access and it pulls several fields from
three linked tables. Most of the fields are text, some are numbers and
date/time types, 1 memo, 1 attachment. There are no parameters or criteria.
The purpose of this query is to give users all the information from these
tables to massage in Excel where they feel more comfortable. I know that
once they run the export from access they could then delete the columns they
don't want, but I've been asked if this would be possible from access.

The query runs fine producing the results we need, but different employees
would like to select only the fields relevant to their departments.
 
J

John W. Vinson

The query I have was designed in MS access and it pulls several fields from
three linked tables. Most of the fields are text, some are numbers and
date/time types, 1 memo, 1 attachment. There are no parameters or criteria.
The purpose of this query is to give users all the information from these
tables to massage in Excel where they feel more comfortable. I know that
once they run the export from access they could then delete the columns they
don't want, but I've been asked if this would be possible from access.

The query runs fine producing the results we need, but different employees
would like to select only the fields relevant to their departments.

Then you'll either need separate departmental queries, or to build the query
in VBA code. You can't do it using paramters.
 
P

PASGEN

Any suggestions on where I can find samples of VBA code that will help me
either on Technet or other coding resource sites?

Thanks
 
J

John W. Vinson

Any suggestions on where I can find samples of VBA code that will help me
either on Technet or other coding resource sites?

Try digging in some of these:
Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Roger Carlson's tutorials, samples and tips:
http://www.rogersaccesslibrary.com/

A free tutorial written by Crystal:
http://allenbrowne.com/casu-22.html

A video how-to series by Crystal:
http://www.YouTube.com/user/LearnAccessByCrystal

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials


or use a Bing or Google search.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top