adding header to a list box.

I am writing the exact query I have put into access, pardon me for any confusion.  This query works fine but the listbox has no heading, I want the list box to have exact same heading as field name in the table.

Me.List_All_Wells.RowSource = "SELECT Permits.[Operator Name] as OPERATOR, Permits.[Well No] as [WELL No],Permits.[API NO] as [API NO],Permits.[Total Depth] as [TOTAL DEPTH] FROM Permits WHERE(Permits.County) = '" & Me.Combo_county & "' and permits.[Operator Name]= '" & Me.combo_operator & "'"

thank you.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AiyshaAuthor Commented:
Though I have used the terms as in the select statements the query still does not show the title of the columns.
When I use a List Box on a form to display the results of a query, I place Labels above the List Box over each column to show the user the name of the columns.  
In your case, it sounds like you want the column headers to show from the SQL statement.   You will need to set the "Column Heads" property to YES (under the Format Tab).  Then your column headings should show.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AiyshaAuthor Commented:
I got that thank you much. Is there any such settings where I can increase or decrease the column width?
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

There is a Column Widths property (just above the "Column Heads" property) ...   you set widths separated by a semi-colon.
In this example in inches, with 7 columns, hiding the first from user:  
Rey Obrero (Capricorn1)Commented:
the List box has a Column Widths property

column widths  0.5"; 1"; 2"

that means the first column is 0.5 inches wide
                            2nd column is  1 inch wide
                            3rd column is  2 inches wide
you also need to set the column Count property of your list box to 3
AiyshaAuthor Commented:
can I do it inside the listbox display?
Rey Obrero (Capricorn1)Commented:
<can I do it inside the listbox display? > No. you have to use the Property sheet of the list box.

if you need to change the columns dynamically, you will need VBA codes to handle that.
Set the Column Heads property of the listbox to Yes
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.