Vba setting control values

flaghippo

Registered User.
Local time
Today, 04:53
Joined
Jan 22, 2012
Messages
19
Hi All
I am using the code below to read into form control combo boxes.
Me.CUSTOMER.Value = EX_CUSTOMER
Me.Contact.Value = EX_CONTACT
Me.QTY.Value = EX_QTY

This works fine until I get to this code
Me.PAINTING.value = EX_PAINT

Strange thing is...
When I enter the line, after me.painting. the "value" text does not show automatically.

Does any one have any clues ??

Thanks
Flag
 
What error message do you get?
Can you show us all of the code in this related procedure?
 
Hi
The error is....
Compile error invalid qualifier.

Its seems to me the VBA code has lost its link with the control on the form.

I have tried .....
[formname].Form![controlname].SetFocus
and
[formname].Form![controlname].value = variable

Still the same code

Is the form corrupt I wonder

Thanks
Flag
 
Last edited:
Are you absolutely sure that the combo is named PAINTING and not something else. If you have a FIELD named PAINTING and the control is NOT named the same, then trying to use .Value will generate an error.
 
Hi
The Control & Name are exactly the same.
Please see attachments .... (NOT SURE THESE ARE ATTACHED)


COMPILE ERROR:

INVALID QUALIFIER
 
Change the name of your PAINTING control to something else e.g. txtPAINTING.
There is a "Painting" property for forms which can only be set to TRUE or FALSE.
When you enter
Me.PAINTING.value = EX_PAINT
you refer to the property of the form and not the control.
 

Users who are viewing this thread

Back
Top Bottom