Solved

Custom column titles in a subform based on a query

Posted on 2003-11-11
8
479 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
 

Author Comment

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

ggv
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now