Zydeceltico
Registered User.
- Local time
- Yesterday, 23:00
- Joined
- Dec 5, 2017
- Messages
- 843
I have Form1 and Form2.
75% of the time Form2 is only opened by clicking a button on Form1. When this happens an ID number is passed from a control on Form1 to a control on Form2 during Form2's Load event. Form1 remains open. When the Save button is clicked on Form2 both forms are saved and closed at the same time.
Here is Form2's Load event code that passes the ID:
The challenge is that Form2 has two Date/Time controls. User clicks a button and =Now() is recorded. Basically Start Time and Stop Time.
Usually this process is of short duration and does not get interrupted so Form2 is open the entire time - however - that doesn't always happen and it becomes necessary to save and close Form2 and come back later to click the Stop Time button.
At a later time, when it is time click the Stop Time button on Form2, I would like to open Form2 to the most recent record and click the Stop Time button but when I open the form it wants the ID that was passed to it from Form1.
Is there a workaround for this?
Form2 is set to Data Entry = Yes.
If I set it to Data Entry = No, what is the code to open it from Form1 for data entry?
Or is there yet a different way to accomplish what I want to do?
Thanks as always!
Tim
75% of the time Form2 is only opened by clicking a button on Form1. When this happens an ID number is passed from a control on Form1 to a control on Form2 during Form2's Load event. Form1 remains open. When the Save button is clicked on Form2 both forms are saved and closed at the same time.
Here is Form2's Load event code that passes the ID:
Code:
Me.InspectionEvent_FK = Forms!frmInspectionEvent!InspectionEvent_PK
The challenge is that Form2 has two Date/Time controls. User clicks a button and =Now() is recorded. Basically Start Time and Stop Time.
Usually this process is of short duration and does not get interrupted so Form2 is open the entire time - however - that doesn't always happen and it becomes necessary to save and close Form2 and come back later to click the Stop Time button.
At a later time, when it is time click the Stop Time button on Form2, I would like to open Form2 to the most recent record and click the Stop Time button but when I open the form it wants the ID that was passed to it from Form1.
Is there a workaround for this?
Form2 is set to Data Entry = Yes.
If I set it to Data Entry = No, what is the code to open it from Form1 for data entry?
Or is there yet a different way to accomplish what I want to do?
Thanks as always!
Tim
Last edited: