Query Query

C

Cameron

Hi,
Just wanted to know why my access query always seems to provide ALL fields from specified tables rather than only those that I have selected (I did not use the asterisk). I can manually go through and get rid of those not relevant after running the query, but this is time-consuming, and I just shouldn't have to do it. Any thoughts?
 
D

Duane Hookom

Queries have an "Output All Fields" property. Make sure this is set to No.

--
Duane Hookom
MS Access MVP


Cameron said:
Hi,
Just wanted to know why my access query always seems to provide ALL fields
from specified tables rather than only those that I have selected (I did not
use the asterisk). I can manually go through and get rid of those not
relevant after running the query, but this is time-consuming, and I just
shouldn't have to do it. Any thoughts?
 
R

Rick Brandt

Cameron said:
Hi,
Just wanted to know why my access query always seems to provide ALL fields
from specified tables rather than only those that I have selected (I did not use
the asterisk). I can manually go through and get rid of those not relevant
after running the query, but this is time-consuming, and I just shouldn't have
to do it. Any thoughts?

Bring up the query's property sheet while in design view and you'll see a
property called "Output All Fields". Your query likely has this set to Yes. If
you examine the SQL of the query you will see that even though you don't see the
asterisk in your grid, it is being included in the SQL when this property is
enabled.

If this is happening on all of your queries then you need to look at Tools -
Options - Tables/Queries. There is a Checkbox that sets the default value for
this property on new queries.
 

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

Top