If the option button is bound to a Yes/No field (instead of the usual check
box), in the option button's After Update event:
If Me.Status = True Then
Me.StatusDate = Now
End If
If there is an option group you will need to put the code into the group's
After Update event.
You may want to guard against somebody changing the status back to open.
That action won't change the StatusDate, but closing again will. That is,
if somebody goes to the record a month after it was closed, sets the status
to open, then sets it to closed, StatusDate will change.
> How can I capture todays DateTime when the user click the Status Closed
> radio button on a form? I don't want the user to type the date. Only
[quoted text clipped - 6 lines]
> any ideas?
> Thanks, Rohn
Rohn Everson - 20 Mar 2008 16:15 GMT
Bruce,
No, it is bound to an SQL backend table with settings like: Char, 1, Nulls
ok, default (' '), indexed no.
That bring up a different problem with not being able to set "Y" and "N" in
the fields. I have "0" and "1" not yes/no. Have to fix this also, since I
want "Y" and "N."
Regards
> If the option button is bound to a Yes/No field (instead of the usual
> check box), in the option button's After Update event:
[quoted text clipped - 21 lines]
>> any ideas?
>> Thanks, Rohn
BruceM - 20 Mar 2008 18:10 GMT
On the first point, I'm not sure what to say since I am not very familiar
with SQL backend tables. Had you specified a SQL back end I would have left
the question to somebody else. However, I think you can still use the After
Update event as described, except from what I can tell you would be testing
for a numeric value rather than True.
You can display the information any way you want. For instance, in the
Control Source of an unbound text box:
=IIf([Status] = 1,"Y","N")
The same expression could be used in a query. You may need to test for
nulls, but that's the general idea.
> Bruce,
> No, it is bound to an SQL backend table with settings like: Char, 1, Nulls
[quoted text clipped - 31 lines]
>>> any ideas?
>>> Thanks, Rohn
Rohn Everson - 26 Mar 2008 19:23 GMT
Bruce, your suggestion worked GREAT..... Thanks!
So how would I NOT allow this date to be updated? I don't see any controls
for that!
Thanks again,
Rohn
> If the option button is bound to a Yes/No field (instead of the usual
> check box), in the option button's After Update event:
[quoted text clipped - 21 lines]
>> any ideas?
>> Thanks, Rohn