Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-populate date in subform using OnClick

Status
Not open for further replies.

Wolfen02

Technical User
Mar 8, 2004
22
0
0
US
I have a subform where I am tracking plan vs actual dates linked to the main form by a unique number. On selecting a date using a MS Date and Time Picker on the subform, the user should be able to populate the plan or actual fields onClick. Originally the subform was a popup and worked using the code below. Now I'm receiving a compile error with usage. Do I need to change the way I'm referencing due to using a subform?

Private Sub Actual_Click()
If Me.ActiveControl.Value = Me.txtDateChoice.Value Then
Me.ActiveControl.Value = ""
Else
Me.ActiveControl.Value = Me.txtDateChoice.Value
End If
End Sub


Teri
Good decisions come from Wisdom...
Wisdom comes from experience...
Experience comes from bad decisions
 
If you suspect a referencing syntax problem, try to play with the expression builder.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top