Custom column titles in a subform based on a query

I have a subform based on a query. It shows records in datasheet view. I have difficulty in figuring out how to display custom column titles. If the query run alone - the custom titles (entered as Caption) are displayed ok. However if I run the query in a subform, MS Access 2000 displays field names as the column titles instead of my custom titles.

Would be most grateful for any hints.

ggv
ggvAsked:
Who is Participating?

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

x
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.

NathanIrwinMining AnalystCommented:
Go to design mode of your subform and modify the 'Caption' propety of the Labels associated with the text boxes etc to display the column title you want when the subform is opened
0
ggvAuthor Commented:
I have labels set in the subform - doesn't work. The labels are in the Form header and although its property Visible is set to Yes, the headers are not shown. Instead field names are displayed as column titles.

ggv
0
NathanIrwinMining AnalystCommented:
Do not put your labels in the Form Header. The labels should be in the Details section of the subform along with the associated text boxes etc.
0
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

ggvAuthor Commented:
Doesn't help either. The subform still displays field names instead of custom titles.

ggv
0
NathanIrwinMining AnalystCommented:
ggv, you've got me stumped. unless there is thing simple I'm missing, I would create the subform again from scratch, I personally have never come across this problem
0
ggvAuthor Commented:
I investigated a number of internet sites before posting this question and found no answers. I know it works with the columnar or other layout types of a subform, but not with datasheet layout (at least I was not able to figure it out). I work with MS Access 2000 and I create the subform by dragging a query onto the main form. I then open the subform itself in design view to move custom titles from the header to the detail section. It should also be mentioned, that there is no Caption property listed for the datasheet fields in the Property box.

How do you create your subforms? Do you work with MS Access 2000? Do you speak specifically about datasheet layout?
0
NathanIrwinMining AnalystCommented:
Hi ggv, sorry for taking so long to get back to you, just had a weeks holiday.

To create my sub forms:
1. I create the query for the subform. this query is usually related to the information in the main form by a Foreign Key, although it is not necessary.

2. I then create a new form with this query as the Record Source. If I want a tabular format, I select the 'Datasheet' option in the forms 'Default View' Property. I then drag the required fields onto the form from the 'Field List' box into the 'Detail' section of the form. If the subform is to be a Datasheet, I dom not modify the form in any other way such as adding headers. I will then change the Textbox controls to Comboboxes etc if required and change the 'Caption' property of the lables for the associated controls if required. Once this is done I open the form in Datasheet View to see what it looks like and adjust column widths etc to give me the result I want.

3. Once the subform has been created saved and closed, I open the main form in design view and drag the subform onto the main form. I will then go to the Properties Dialog page for the subform and set up the 'Link Child Fields' and 'Link Master Fields' properties if the information in the subform is associated with that of the main form.

I am currently using Access 2002, and have been using Access for about 6-7 years
0

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
ggvAuthor Commented:
Oh yes, it does work when you drag the fields one by one onto the form from the query. I was trying to drag the whole query itself and almost got sick trying to install my own column titles.

Thanks a lot.
ggv
0
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.