Dynamic Controls Array

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
 
A

Arvin Meyer

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
 
H

HSalim

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
 
N

Noor

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
 
H

HSalim

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
 

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

Top