Dynamic Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a dynamic form. Here is how it works: the user selects
a query, and hits submit on a menu form. A form is then created and the
record source is assigned based on the users initial query selection. Now
the question/problem:

Once the form is loaded, all of the captions/labels are generic. I would
like to change this using vba. Is there any way to get column header
information on the query programmatically?

Ideas?
 
dmericksen said:
I am trying to create a dynamic form. Here is how it works: the user selects
a query, and hits submit on a menu form. A form is then created and the
record source is assigned based on the users initial query selection. Now
the question/problem:

Once the form is loaded, all of the captions/labels are generic. I would
like to change this using vba. Is there any way to get column header
information on the query programmatically?

Ideas?

I posted some (rough) form creation code here:

http://groups.google.com/group/microsoft.public.access/msg/0fd179f25848911f

If I'm not mistaken, it sounds like you want to look at the Fields
collection of the QueryDef object to obtain the names of the fields to
use within control names on your dynamic form. Including the query name
as a hidden column in the combobox is a simple way to obtain the chosen
QueryDef name.

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dynamic Forms VBA 2
Parameter Value error in a Subform 0
Query Parameter using multiple options 0
Alter Report Captions from a Subform 3
Dynamic form 3
When to close QueryDef 6
Access Open Form with WhereCondition 6
Access Form Refresh 1

Back
Top