Dynamic Controls Array

  • Thread starter Thread starter Noor
  • Start date Start date
N

Noor

Hi All

I need to create a dynamic control array.
How can i do it in ms access

actually i have a cross tab query that returns me employee name as column
heading.
the employee names can vary means.. they are not static.

so how can i map them on to the form coz in design time, i dont know how
many employee will return..

i s there an easy way to do it.?/

one more thing.

is there a data grid control for ms access, if i have a datagrid, it can
really solve my problem

Thanks

NM
 
Access does not support Control Arrays, but you can "fake" them with code.
For example, if the controls are named "txtText1", "txtText2", "txtText3"
etc.:

Dim i As Integer
For i = 1 to 10
Me("txtText" & i).Visible = True
Next i
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Noor,
You can add a reference to a data grid and use it jut like any other activeX
control
You can use any third party grid too - like FlexGrid from ComponentOne

HS
 
I did it.. but it was not showing flexgrid or datagrid properties in the
properties window..
tell me how to access the properties of datagrid so i can bind the control
to database

thanks

Noor
 
I have office XP which comes with a light version of the FlexGrid Control
from ComponentOne.
I just tried it (the light version) for the first time just now.
Unfortunately, it does not allow data binding.
(I do have the full version but have never thought to use it in Access -
just not had the need I guess)

If you want full functionality you may have to buy the product.

Tou can get Microsoft's Datagrid Control from the toolbox, but you will need
a license for that as well, unless you have the developer edition.

Regards
HS
 
Back
Top