Datasheet View shows too many fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have only two fields in the design grid, but when I run the query, all the
fileds in the field list appear in the Datasheet view.
The SQL is as follows:

SELECT tblPNList.MaterialNbr, tblPNList.MaterialDesc, *
FROM tblPNList;
 
Drop the * symbol.
This tells Access to bring over all the fields.

Change the SQL to this:

SELECT tblPNList.MaterialNbr, tblPNList.MaterialDesc
FROM tblPNList;
 
Hi JohnL,
If you remove the "*", then it will just show the first two field. The "*"
is selecting every fields in the given table.
 
Thanks for you quick reply. After some trial and error, I was succesful when
I removed the preceeding comma and space as well as the asterisk. Thanks
again.
Do you have any idea why the wildcard is appearing, seemingly on its own?
 
The only way that I know that "*" will appear is when you double click on the
"*" in the table in Design view or you put it in yourself.
 
Its a setting under TOOLS:OPTIONS:Tables and Queries Tab.

Uncheck Output all fields in the query design section and then click the Ok
button to save your "default" change.

It can also be set on individual queries. It is a property on the query
property sheet - it is the second property in the list "Output all fields".
 
Back
Top