Cant find column width in VBA

ECEK

Registered User.
Local time
Today, 05:25
Joined
Dec 19, 2012
Messages
717
I have two forms. Both are datasheets. Form1 is based on a Query. Form2 is based on a Grouped Query.
Form1 has the following on load:

Code:
    Me.[Field1].ColumnWidth = -2
    Me.[Field2].ColumnWidth = -2
    Me.[Field3].ColumnWidth = -2
    Me.[Field4].ColumnWidth = -2
    Me.[Field5].ColumnWidth = -2

However when I go to type the OnLoad VBA in Form2, the prompts give me "value" instead of ColumnWidth.

I can't understand why Form2 isnt working?

Any help is gratefully appreciated.
 
have you tried to rename the columns of the datasheet (name the textbox different with the name of the field, ie: Field1 rename the textbox to txtField1), then use the name of textbox (txtField1.ColumnWidth = -2)
 
My solution was to copy Form1 change the data source and rename.
Must have just been a glitch !!!
 

Users who are viewing this thread

Back
Top Bottom