I have a calendar form called "Master Menu". On that form, I have the subform "EventMaster_Subform" that occurs 37 times. The name label on each subform is SF1, SF2 .... SF37.
The EventMaster_Subform is a Continuous Form that has
In the Header for the subform
1) a Lbl_Date that is formatted to show the only day of the month
2) and "Action button" that, when clicked, opens a new form that allows the user to enter/edit new games for that day.
In the Detail for the subform
3) a List of Baseball games for that day - tied to the "Event_Master" table
The idea is ... when a user chooses that day (by double clicking the Action button), I want the new form "Event master data form" to open with the date from the subform.
Note ... there are 37 possible "buttons" to choose from (one for each day) and 37 possible subforms.
In the "doubleclick" event, I created a procedure to open the form as well as store the date (and other information) in a table called CURRENTSESSION.
I can NOT figure out how to reference the LBL_DATE from the subform in order to store the Date value in the CURRENTSESSION table.
Here's a snippet of the code I have in the procedure
Dim passdate As Date
Dim strControlName As String
Dim strControlFrm As Form
' Get the name for the subform SF1 ... SF37
strControlName = Screen.ActiveForm.ActiveControl.Name
' Construct the Full form name
Set strControlFrm = Forms![Master Menu].Controls([strControlName]).Form
' Get the value of the date from the subform
passdate = Forms!strControlFrm![lbl_Date].Value