Conditioning a checkbox

R

Rebeca

I have a checkbox column in my table which I would like to be checked off
automatically when a particular 'date' field in the same table / form is no
longer blank. Can this be done?
 
S

Steve Schapel

Rebeca,

Yes, it can. You can use a macro with a SetValue action, which you
would assign on the AfterUpdate event of the date control on the form.

In the macro, you would put like this in the Condition:
[YourDateFieldName] Is Not Null
(if you can't see the Conditions column in the macro design window,
select it from the View menu).

And then the arguments for the SetValue are like this...
Item: [NameOfYourCheckbox]
Expression: -1
 
R

Rebeca

Thanks Steve, but no luck.
I'm a novice so be patient, but this is what I've done.
1. opened the design view on my form
2. opened the property sheet
3. clicked on my date field, went to 'event', clicked 'after update', went
to the macro builder and followed your instructions. When I try to run or
save the macro, I get a message that says it can't find 'Delv Date' (which is
the name my date field). What am I doing wrong?

Thanks again.

Steve Schapel said:
Rebeca,

Yes, it can. You can use a macro with a SetValue action, which you
would assign on the AfterUpdate event of the date control on the form.

In the macro, you would put like this in the Condition:
[YourDateFieldName] Is Not Null
(if you can't see the Conditions column in the macro design window,
select it from the View menu).

And then the arguments for the SetValue are like this...
Item: [NameOfYourCheckbox]
Expression: -1

--
Steve Schapel, Microsoft Access MVP
I have a checkbox column in my table which I would like to be checked off
automatically when a particular 'date' field in the same table / form is no
longer blank. Can this be done?
 
S

Steve Schapel

Rebeca,

What version of Access are you using?

Can you please tell me exactly what you have in the macro? And when you
look again at the properties of the date control on your form, what do
you see there? Is it the name of the macro?
 
R

Rebeca

Steve,
I'm using Access 2007. I updated the marcro so now under condition it says:
Forms![DelvDate] is not null. I don't get that error message anymore. When I
went to the property sheet, I was able to select the macro I created (close
record) under 'after update'. But now I get a new error message when I try to
test the macro:
"A problem occurred while Microsoft Office Access was communicating with the
OLE server or ActiveXControl. Close the OLE server and restart it outside of
Microsoft Office Access. Then try the original operation again in Microsoft
Office Access."
I don't even know what the OLE server is. FYI I'm not on a network, it's
just my computer.
Thanks.
 

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