RE: Update a checkbox after date is entered



Sounds like you are using a data*** view form. Can you change that to a
continuous form? Datasheets are weird beasts. I typically do not use
datasheets for any data entry because this sort of thing happens.

As to not finding the macro, there is some sort of naming issue here or the
code is not in the correct place.

Can you post back with what you have in your code?
--
Dave Hargis, Microsoft Access MVP


"Adriana" wrote:

Ok, I did that except the checkbox shows checked for records where there is
no Date_Returned. If I click in a Date_Returned, all the checkboxes clear
even though there is a Date_Returned date in other records. If I attempt to
insert a date in the Date_Returned box, I get an error message telling me it
can't find the macro.

"Klatuu" wrote:

I think you may have put the code in the wrong place. It does not go
directly into the text boxes in the properties dialog. It has to go in the
form module. Here is the procedure:
Open the form in design view
Open the properties dialog
Select the form
Position your cursor in the On Current text box
Ckick the button that appears with the dots ...
Select Code Builder
The VBA Editor will open with the cursor positioned in the event's sub
Enter the code

Do the same for the Date_Returned control except it goes in the After Update
event.

--
Dave Hargis, Microsoft Access MVP


"Adriana" wrote:

I did that and here's the message I got:
MS Access can't find the macro "Me". The macro (or it's macrogroup) doesn't
exist or the macro hasn't been saved...."
I saved it but it keeps on giving me the same message. Should I make a
macro called Me? or should I change Me to the form name?


"Klatuu" wrote:

Put the following line of code in two places on your form.
In the Form's Current event and in the Date_Returned control's After Update
event.
Me.HandsetAtUSAWS = Not IsNull(Me.Date_Returned)
--
Dave Hargis, Microsoft Access MVP


"Adriana" wrote:

I have a subform with a Date_Returned field that signifies that an item ws
returned to our site. Since this is a subform, there may be a few date
returned records for a particular item so I'll need the latest date.
Additionally, there is a checkbox (named HandsetAtUSAWS) to signify that the
item (handset in this case) is at our site. I want the checkbox to be
automatically checked if there is a Date Returned (most recent of course) and
unchecked if there is no date (there is also a Date Sent to signify that
handset was sent out and not at our site). I tried the other suggestions on
this MS help site, but they do not work. The purpose of this will be a form
that will contain a filter command button where users can filter which
handsets are at our site. Please help, I'm going crazy with this and it's
alot harder than I thought.
.