Dynamic forms or editable table?

Insomnia

Registered User.
Local time
Today, 02:41
Joined
Oct 9, 2004
Messages
30
Hi there,

I need to have subforms with a dynamic number of columns, e.g., the number will change depending on a number of settings. In fact, only the first column is fixed.

I've managed to build a table dynamically, but the default column with is really messed up, way to narrow. Can I adjust the table column with dynamically, if not, what is the best option? I do not need any events, since it's content is not to be edited.

I do not expect you to provide me with code, but please me help pick a suitable solution. :rolleyes:
 
Last edited:
Insomnia,

You will have insomnia by the time that you finish this.

Loop through your controls from left-to-right.
Might help if there names were actually Text1 ... Text2 ... Text3 ...

Code:
Set LeftPos = 0

For each control
   Get the max length of its data field.
   Set Me.YourControl.Width = 750 * MaxChars
   Set ME.YourControl.Left = LeftPos
   LeftPos = LeftPos + 750 * MaxChars
   Next Control

Don't dynamically create forms, but should be an interesting task.

Wayne
 
Didn't choose this nick for no reason, I am close all ready. I take it my task is not a pull over, But I really need to make both column content and number flexible, Maybe easier to make a form and hide columns not neaded? if you have a good link for it I would be delighted spend the next fortnight learning how to use it :-)
 
What do you think about producing an excel (htm) sheet and linking it into the sub? Could even be the better solution, both regarding buildin it and the actual design of it?
 

Users who are viewing this thread

Back
Top Bottom