J
Jaybird
This should be an easy one... I have a form that is designed to be a log for
entering processes and times. There are several Date/Time entries to be made
on the form. I created a form(frmTime) that pops up when one of the
Date/Time fields are clicked. The user can then input the appropriate date
and time. Well, right now it only works for the [In] field. But, I'd like
to use the same form to enter different data into other Date/Time fields.
Can someone tell me the appropriate technique for this? Here's my code (such
as it is):
Private Sub Close_Form_Click()
On Error GoTo Err_Close_Form_Click
Forms![HT Load Info]![In] = Me.Date & " " & Me.Hour & ":" & Me.Min & ":" &
Me.Sec
DoCmd.Close
Exit_Close_Form_Click:
Exit Sub
Err_Close_Form_Click:
MsgBox Err.Description
Resume Exit_Close_Form_Click
End Sub
As you can see, the values are passed to the main form when the "close"
button is clicked. However, unless I want to make a similar form for ALL of
my Date/Time fields, this technique won't work. I don't know how to make the
current field a variable so that this form will work for all of them.
entering processes and times. There are several Date/Time entries to be made
on the form. I created a form(frmTime) that pops up when one of the
Date/Time fields are clicked. The user can then input the appropriate date
and time. Well, right now it only works for the [In] field. But, I'd like
to use the same form to enter different data into other Date/Time fields.
Can someone tell me the appropriate technique for this? Here's my code (such
as it is):
Private Sub Close_Form_Click()
On Error GoTo Err_Close_Form_Click
Forms![HT Load Info]![In] = Me.Date & " " & Me.Hour & ":" & Me.Min & ":" &
Me.Sec
DoCmd.Close
Exit_Close_Form_Click:
Exit Sub
Err_Close_Form_Click:
MsgBox Err.Description
Resume Exit_Close_Form_Click
End Sub
As you can see, the values are passed to the main form when the "close"
button is clicked. However, unless I want to make a similar form for ALL of
my Date/Time fields, this technique won't work. I don't know how to make the
current field a variable so that this form will work for all of them.