> Not simple. You would need to set the Enabled property of the controls, or
> meddle with the ForeColor and BackColor properties.
>
> How about adding a transparent rectangle with (say) a red border, and size
> it so it fits around the edge of the Detail section of your form? Make it
> Visible when locked, and not visible with unlocked. It's a pretty good
> visual clue for the user. That way you have just one more line of code to
> add:
> Me.rctLock.Visible = Not bAllow
> where "rctLock" is the name of the red rectangle.
>
> There's a screenshot of the concept here:
>
http://allenbrowne.com/ser-56.html> (though the article is describing a more advanced solution for this issue.)
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users -
http://allenbrowne.com/tips.html> Reply to group, rather than allenbrowne at mvps dot org.
>
> "slreilly" <slreilly[ at ]discussions.microsoft.com> wrote in message
> news:BA87E2A3-CF05-42CD-9807-2D0291A44C11[ at ]microsoft.com...
> > I've found some code here that allows me to lock & unlock forms with a
> > button
> > - that part works great, but I'd like to change the format of the fields
> > so
> > it's obvious which state it's in. i.e., greyed-out for locked. Can I add
> > something to this code (from Allen Browne originally, thanks allen!) to do
> > that?
> >
> > Private Sub cmdLock_Click()
> > Me.Refresh
> > Dim bAllow As Boolean
> > bAllow = Not Me.AllowEdits
> > Me.AllowEdits = bAllow
> > Me.AllowAdditions = bAllow
> > Me.AllowDeletions = bAllow
> > Me.cmdLock.Caption = IIf(bAllow, "&Lock", "Un&Lock")
> > End Sub
> >
> > I'm new to VBA but I can paste & clip with the best of them. So far so
> > good.
> > Thanks,
> > Seana
> >
>
>
>