need code to place date on check box or button click

JSDART!!

Registered User.
Local time
Yesterday, 22:37
Joined
Mar 12, 2004
Messages
31
Hi
I have a database with a form and subform
the database is for a bedlist tracking system
it monitors both the bed availablity and the treatment episode of the person.
the form has the bed specific info
and the subform the episode specific info.
I need to be able to create 3 check boxes on the episode subform that when true will trigger the entry of Date() into the admit field which is a date on the main form.
You see the episode form is tracking the
checkin
seen by counselor
seen by nurse
admitted
[Date and time} in one table (episode table)
The Bed availability table is tracking the bed info. Subsequent qrys are based on the Admit fields on the Bed info.
rather than having the user filll in the Admit date on both form and sub form I thought it would be smoother if I could have a check box on the subform that would say admitted/bed filled
another that would Discharged/release bed that would when true enter a date into the discharge field on the bed info

any suggestions greatly appreciated
J
 
Try this:

frmMain is your main form
frmSub is your subform

In your subform, you have to place this code in the OnUpdate() property of the flag.

Code:
If Me.flgAdmitted.Value = True Then
  [Forms]![frmMain]![txtDateAdmitted].Value = Date()
End If

Same thing can be done for the discharged field.

Hope this helps!

Seth
 
Thank you seth
I was able to do the if than from the form
it was between the form and sub form works great thanks
 

Users who are viewing this thread

Back
Top Bottom