G
Gulf Coast Electric
I have a form with another form on it and I want to be able to use the
secondary form to input the date to an unbound field on the main form.
The main form is named frmautopayroll and the other form is named
calendarytd.
The sub-form is a calender form that inputs the date into an unbound field
after clicking on any date.
I also want it to transfer this date to the main form to the unbound field
AnyDate.
The sub-form is not linked to the main form.
My code below does not do this???
It says it cant find the form CalendarYTD
Suggestions!!!
On Error GoTo SetDate_Error
If SetDate.Caption = "Set Begin Date" Then
BeginDate = SelectDate.Value
SetDate.Caption = "Set End Date"
End If
Forms![frmautopayrollreport]![AnyDate] = Forms![calendarytd]![BeginDate]
Exit Sub
SetDate_Error:
MsgBox Err.Description
Exit Sub
End Sub
--
-------------------------------------------------------------------------
This email and any files transmitted with it from Gulf Coast Electric are
confidential and intended solely for the
use of the individual or entity to which they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.
FIGHT BACK AGAINST SPAM!
http://mail.giantcompany.com
secondary form to input the date to an unbound field on the main form.
The main form is named frmautopayroll and the other form is named
calendarytd.
The sub-form is a calender form that inputs the date into an unbound field
after clicking on any date.
I also want it to transfer this date to the main form to the unbound field
AnyDate.
The sub-form is not linked to the main form.
My code below does not do this???
It says it cant find the form CalendarYTD
Suggestions!!!
On Error GoTo SetDate_Error
If SetDate.Caption = "Set Begin Date" Then
BeginDate = SelectDate.Value
SetDate.Caption = "Set End Date"
End If
Forms![frmautopayrollreport]![AnyDate] = Forms![calendarytd]![BeginDate]
Exit Sub
SetDate_Error:
MsgBox Err.Description
Exit Sub
End Sub
--
-------------------------------------------------------------------------
This email and any files transmitted with it from Gulf Coast Electric are
confidential and intended solely for the
use of the individual or entity to which they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.
FIGHT BACK AGAINST SPAM!
http://mail.giantcompany.com