BAckground Colour

G

Guest

I have set up a Form which opens locked ie. you are not allowed to edit,
using the Me.AllowEdits=False statement. I have set up a command button which
changes that statement to True thus enabling Edits. Is it possible to change
the background colour of the fields while in the Edit mode and then reset the
colour when the record is saved.
 
A

Allen Browne

Yes, you can do that. Loop through the Controls collection on the form, and
set the BackColor property of those controls that have this property. (Some
don't.)

Alternatively, you could set up a rectangle around the form like this:
http://allenbrowne.com/ser-56.html
 
G

Guest

Hi Allen

Thanks for that, the basic function works well, however, evertime I click
the Unlock command button I get the erro message 'Error 2455- You entered an
expression that has an invalid reference to the property Form/Report.

Do you have any ideas?

Thanks
Fritz
 
A

Allen Browne

Sounds like you are not passing in a valid reference to the form.

Did you pass Me?

Or, if it's a subform, did you include the .Form bit?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top