Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding unnecessary columns

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, I was wondering if you could help me...

How do you write a SQL statement in Access to return only selected fields. For example, I have a database with 10 items in it pertaining to class registrations.

I want to write an SQL statement that will list the people registered in Class X and Class Y. I do not want the query to come back with all the possible Classes, I only want Class X and Class Y columns to show up.

I have tried looking into the ColumnHide, but I don't know how to implement it into the SQL statement.

Any help would be greatly appreciated.
Thanks
 
Just omit the column names you don't want from your SQL Select statement.
 
I am rather new myself, but will give this a try. If column x and column y are separate columns, why not go into the qbe grid and just include those columns in the design grid? Hoping that helps..
 
GirlLost,

I think your problem is in the design of your table. Can you tell us the columns in the table? Terry M. Hoey
 
I think I may have given the wrong interpretation...what I'm trying to do is the following.

On a form, I have a bunch of checkboxes with a label that corresponds to the item in the table. When I check a checkbox off on the form, I want a report generated that will only list the item with the checkbox checked off, and subsequently listing only items if more than one checkbox is checked off.

I am able to do this with individual queries, but I would like to create a query that incorporates all the items but only displays items that have been checked off.

by the way, thanks for the previous responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top