Hemant Sisodia
Hemant Sisodia

Reputation: 498

How to Create a Continuous Form in Access VBA with variable number of Text Boxes

I know how to design a Continuous Form in Access VBA 2010 with adding a number of Text Boxes and setting the Form Default View as Continuous Form and then setting the Form's Record Source to a Query. So the data would be shown in a Grid Format perfectly. However, I want to add these Text Boxes dynamically, means the query that's going to be bound to that form would have variable number of columns everytime depending on the selection in filters. So, how can I do that?

I don't want to set the Table or a query directly as the source of that form as I won't have the freedom of conditional formatting also.

Upvotes: 0

Views: 1017

Answers (1)

Gustav
Gustav

Reputation: 56026

The easy method is to create the maximum number of textboxes to be displayed, then hide those that you do not wish to display for the current filter.

Upvotes: 0

Related Questions