Lock Record

  • Thread starter Thread starter eb1mom
  • Start date Start date
E

eb1mom

I have two command buttons that don't "lock/disable" for
me. I have set form properties to not allow edits, not
allow updates,and tried to use the record locks etc.etc. I
can get all information on the form to not allow changes
except, the two command buttons are always active and allow
changes no matter how I set form properties. The command
buttons, on click, run macros to set the value of text
boxes to date=now. The buttons are for start and stop time.
What am I doing wrong here?
 
Command Buttons are activeX objects that have no
relationship to Access Tables or Queries therefore the form
properties you mentioned do not apply to them. To stop a
user from clicking on a command button, you can set either
its Visible property or its Enabled property to False.

Hope That Helps
Gerald Stanley MCSD
 
ActiveX objects have no relationship to form properties?
This is a good thing to know. Obviously I am a newbie.I do
want them to be able to click command button once. Is there
some other control I could use to run a macro that would
have a relationship to form properties?
Thanks Gerald you have helped
 
-----Original Message-----
ActiveX objects have no relationship to form properties?

Command Buttons have no relationship to form properties.
Bound controls do have a relationship to form properties
This is a good thing to know. Obviously I am a newbie.I do
want them to be able to click command button once. Is there
some other control I could use to run a macro that would
have a relationship to form properties?

Try putting something along the lines of the following in
the Click event handler of your Command Button. It should
enable the user to press the button once only to run your
macro.

DoCmd.RunMacro {your macro}
{yourCommandButton}.Enabled = False
 
Back
Top