How to click on a listing of dates within a form/subform and have the form go to that date?

I have a form call ProgressNote which consist of a subform of 4 tab controls - works great.
On the ProgressNote form I have another subform called ServiceDates - the subform is pulling in the correct ServiceDate value.
I would like to be able to click on anyone of the ServiceDates in the subform and the ProgressNote form will go to that record for that date.  How do I do this.  I have included a screenshot of my form along with notes (data is fictitious).

I would greatly appreciate any help/instructions.

Thanks
ServiceDates-subform.docx
donvike1Asked:
Who is Participating?
 
donvike1Connect With a Mentor Author Commented:
I found the solution to the frm_ProgressNote form and DateOfService subform by doing the following:
Click on the DateOfService textbox control on the subform
Click properties - Event - 3 dots
You will see
Private Sub DateOfService_Click()
type the following just above End Sub and just below Private Sub
DoCmd.OpenForm "frm_ProgressNote", , , "[DateOfService]= #" & Me.DateOfService & "#"
0
 
ASP8MBMCommented:
Many ways, but I have done something similar recently:

1) The data source of your subform must be dependent on the on the ServiceDate value(include the date in the query or the SQL string)

2) have an event built for the ServiceDate (I am assuming it is a text control), and upong Clicking (Use Click_Event) you requery your subform(yourSubform.Requery)

You can also use filters....
0
 
donvike1Author Commented:
Ok, my data source for the subform is dependent on the ServiceDate value and I have an event.
My data is coming through just fine.
I would like to know how to click on the service date for the pt and the ProgressNote form reopens to that record for the date that was click.
0
 
donvike1Author Commented:
The other comments did not work for me as I did not understand, so I read up on all the events and controls and was able to resolve the issue.
0
 
donvike1Author Commented:
Correction
I found the solution to the frm_ProgressNote form and DateOfService subform by doing the following:
Right Click on the DateOfService textbox control on the subform
Click properties - Event - 3 dots
You will see
Private Sub DateOfService_Click()
type the following just above End Sub and just below Private Sub
DoCmd.OpenForm "frm_ProgressNote", , , "[DateOfService]= #" & Me.DateOfService & "#"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.