Refer to Sub-form and input Date?

  • Thread starter Gulf Coast Electric
  • Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top