Move columns

daveUK

Registered User.
Local time
Today, 21:56
Joined
Jan 2, 2002
Messages
234
Hi

I'm creating a staff database and have a form with option buttons on, which allow users to decide which fields they wish to view.

I have used a bit of code on the reports open event, which hides the column if the option button isn't selected, but I need to move the columns so that there aren't any gaps between them.

Any ideas?

Thanks

Dave
 
You can move any control from the same form like so:
me.YourField.Top = 1

there are simular bottom and left properties you can set.

Regards
 
Thanks namliam

Do you know if there is any way to do this dynamically? There are about 15 fields that users can choose and I don't want any gaps. I'd like all of the populated colums lines up from the left.
 
You can do something of a for next loop
Then see if the field is visible and add the me.yourfield.width + a small space.

I am guessing you would want the proper labels to move as well...

if you cant figure it out make a small sample and i will have a try at it...

Regards
 

Users who are viewing this thread

Back
Top Bottom