donvike1
asked on
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
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
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
ASKER
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 & "#"
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 & "#"
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.Requer
You can also use filters....