Solved

Custom column titles in a subform based on a query

Posted on 2003-11-11
8
484 Views
Last Modified: 2006-11-17
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
0
Comment
Question by:ggv
  • 4
  • 4
8 Comments
 
LVL 7

Expert Comment

by:NathanIrwin
ID: 9720725
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
 

Author Comment

by:ggv
ID: 9722445
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
 
LVL 7

Expert Comment

by:NathanIrwin
ID: 9726679
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ggv
ID: 9732884
Doesn't help either. The subform still displays field names instead of custom titles.

ggv
0
 
LVL 7

Expert Comment

by:NathanIrwin
ID: 9735348
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
 

Author Comment

by:ggv
ID: 9742172
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
 
LVL 7

Accepted Solution

by:
NathanIrwin earned 45 total points
ID: 9795070
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
 

Author Comment

by:ggv
ID: 9816516
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question