Set Date via popup form?

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

I have a form named frmSetpaydate that I want to use to set the date on a
sub-form on my main form.
I have command buttons on the popup form for the days of the week, i.e.
Thursday Thru Wednesday
There names and caption names are respective to the days of the week, i.e
Thursday is caption and name
Cant get the below code to set the date on my form when code is triggered,
why?

Forms![TimeCards]![Time and Hours].Form![WorkDate] = Thursday.Value
Forms!TimeCards![Time and Hours].Form!Hours.SetFocus
DoCmd.Close acForm, "frmSetpaydate"
 
If the control 'Thursday' is a command button, it won't have a property
called Value. Try
Forms![TimeCards]![Time and Hours].Form![WorkDate] = Thursday.Caption

Hope This Helps
Gerald Stanley MCSD
 
Back
Top