Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically create subform bound fields

Status
Not open for further replies.

jreichert

MIS
Jan 2, 2002
3
US
Here's my problem:

I use a dynamic SQL string as the RecordSource for my subform (Results window for query) The subform contains unbound text boxes that I would like to use for bound fields from the SQL string. I want those unbound boxes bound after the SQL string variable has been changed, but I want them bound only to the fields that were chosen by the user before they ran the SQL query.

Does that make any sense?
 
Hi

It sounds as if you need something like

Forms![Mainformname]![SubFormName]!TextBoxName.ControlSource = ChosenFieldName

for each of the fields the user has chosen.

You could set these at the same time as you are creating the SQL string.

Tom
 
I could use that except that the field list that the user creates is stored as a String and I have no way of knowing how many fields they choose or in what order and grouping.

I'm using a product called ActiveQuery to build the SQL string and to set the order and field selction for the users.
 
Sorry, I've never used ActiveQuery so can't help you with that

Tom
 
Do you know of anyway to take a String field list and then dynamically bind those fields onto the unbound Text boxes?

I can bind the captions of those text boxes just not the actual fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top