Macro Commands\Values help

J

Jery J.

I am trying to build a macro that will be used with a button on a form that
when clicked it will checkoff on a checkbox field named Comp_Rev within the
table, save the record and then advance it to the next record.

I have tried a number commands but i cannot find anything that gives the
command of checking off a box in the specific field on the table.

I appreciate any help, thanks in advance!
 
S

Steve Schapel

Jery,

This is a strange request. If you are going to click something, why not
just click the checkbox control directly, rather than clicking a command
button to then have that tick the checkbox.

Anyway, in a macro, a SetValue action will do what you want here. The
arguments would be:
Item: [Comp_Rev]
Expression: Yes
 
J

Jery J.

I know it's kinda round-about but, the reason for the command button is
because we have issues with employees entering information to show something
is completed even though it's not and then backtracking and changing it. This
is going to be in a form view were they wont be able to see that particular
check box to check then later uncheck it or change it and the record
automatically continues along in the other processes once the button is hit.
Thank you for your help i'll work on it.

Steve Schapel said:
Jery,

This is a strange request. If you are going to click something, why not
just click the checkbox control directly, rather than clicking a command
button to then have that tick the checkbox.

Anyway, in a macro, a SetValue action will do what you want here. The
arguments would be:
Item: [Comp_Rev]
Expression: Yes

--
Steve Schapel, Microsoft Access MVP

Jery J. said:
I am trying to build a macro that will be used with a button on a form
that
when clicked it will checkoff on a checkbox field named Comp_Rev within
the
table, save the record and then advance it to the next record.

I have tried a number commands but i cannot find anything that gives the
command of checking off a box in the specific field on the table.

I appreciate any help, thanks in advance!
 
S

Steve Schapel

Jery,

Ah, ok now I understand! :) In that case, it's not a bad idea. An
alternative approach would be to show the checkbox for the Yes/No field, but
once it is ticked you set its Enagbled property to No so it can't be
un-ticked again.

Anyway, let us know if you need any more help.
 
J

Jery J.

Using Access 2007, I tried to run the macro using the following actions
Action: SetValue
Arguments: [EXET]![COMP_REV], YES
but the macro fails stating "...access can't find the name "EXET" you
entered in the expression." The EXET is the table the Comp_Rev field is in. I
selected the field browsing within the item field selecting tables and
pointing it to the appropriate field. Then i changed the expression value to
yes but it fails everytime i run the Macro.
 
S

Steve Schapel

Jery,

As indicated in my earlier reply, the arguments would be:
Item: [Comp_Rev]
Expression: Yes

This assumes the checkbox on the form is named Comp_Rev.
 

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