Compile Error: Argument not Optional

ion97

Registered User.
Local time
Today, 16:10
Joined
Feb 28, 2001
Messages
27
On opening my form I have added the following code in order to change the backolor according to the value of a specific field in that form:

If Me![Field].value = -1 Then
Me.Section.BackColor =10053222
Else ......

However when the form loads I get an error message
Compile error:
Argument not Optional

When the visual basic window opens, the
" .Section" part is highlighted.
Anyone knows what is wrong?

Thanx in advance
 
Yes, you have to specify which section.

So, turn your code into:
Me.Section(0).BackColor =10053222

And you should be good to go.
 

Users who are viewing this thread

Back
Top Bottom