?
Solved

Custom column titles in a subform based on a query

Posted on 2003-11-11
8
Medium Priority
?
491 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
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 

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 180 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

840 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