Zydeceltico
Registered User.
- Local time
- Today, 13:02
- Joined
- Dec 5, 2017
- Messages
- 843
Hi All -
I have a mockup db attached. It represents our real world workflow needs.
There are two tables: tblCampingTrip and tblTripDetails.
tblCampingTrip has a field named MiscThoughts. How to populate that field from a 3rd open form is the subject of this post.
There are three forms that are always presented in this order: frmCampingTrip; frmTripDetails; frmGetMiscThoughts.
frmCampingTrip and frmTripDetails are both bound to their underlying tables and linked/related on CampingTrip_ID.
CampingTrip_ID is passed from frmCampingTrip to frmTripDetails via OpenArgs.
frmGetMiscThoughts is currently unbound. It has one unbound textbox on it: txtMiscThoughts.
Although it currently does not do anything, CampingTrip_ID is also passed to frmGetMiscThoughts via OpenArgs.
All forms are data entry = Yes.
frmTripDetails and frmGetMiscThoughts are pop-up and modal.
frmCampingTrip is open the entire time and is requeried after frmTripDetails has been saved.
The db opens to frmCampingTrip where some data is input and a command button is clicked to open frmTripDetails using this code:
This records the data from frmCampingTrip into tblCampingTrip and opens frmTripDetails in order to enter related data into tblTripDetails. You'll notice the "Save/Exit" button on frmTripDetails is not enabled at this point because the user must also open frmGetMiscThoughts and add a note there. So the user clicks the "Enter Misc Thoughts" button and frmGetMiscThoughts opens.
There is a single unbound field on frmGetMiscThoughts named txtMiscThoughts. I want the value the user types in this box to be recorded in the field MiscThoughts in tblCampingTrip.
Right now, entering data and clicking Save and Exit results in nothing.
I believe that at this point the record from frmCampingTrip is already saved in tblCampingTrip.
There is a "Save and Exit" button on frmGetMiscThoughts.
Would an append query attached to that command button's On Click event record the value in txtMiscThoughts to tblCampingTrip?
Is there a better way to accomplish this given 1) subforms are out of the question at this point and 2) this really does exactly represent our real world workflow.
Thanks a bunch,
Tim
I have a mockup db attached. It represents our real world workflow needs.
There are two tables: tblCampingTrip and tblTripDetails.
tblCampingTrip has a field named MiscThoughts. How to populate that field from a 3rd open form is the subject of this post.
There are three forms that are always presented in this order: frmCampingTrip; frmTripDetails; frmGetMiscThoughts.
frmCampingTrip and frmTripDetails are both bound to their underlying tables and linked/related on CampingTrip_ID.
CampingTrip_ID is passed from frmCampingTrip to frmTripDetails via OpenArgs.
frmGetMiscThoughts is currently unbound. It has one unbound textbox on it: txtMiscThoughts.
Although it currently does not do anything, CampingTrip_ID is also passed to frmGetMiscThoughts via OpenArgs.
All forms are data entry = Yes.
frmTripDetails and frmGetMiscThoughts are pop-up and modal.
frmCampingTrip is open the entire time and is requeried after frmTripDetails has been saved.
The db opens to frmCampingTrip where some data is input and a command button is clicked to open frmTripDetails using this code:
Code:
Private Sub Command15_Click()
Me.Dirty = False
DoCmd.OpenForm "frmTripDetails", acNormal, , , , , CampingTrip_ID
End Sub
This records the data from frmCampingTrip into tblCampingTrip and opens frmTripDetails in order to enter related data into tblTripDetails. You'll notice the "Save/Exit" button on frmTripDetails is not enabled at this point because the user must also open frmGetMiscThoughts and add a note there. So the user clicks the "Enter Misc Thoughts" button and frmGetMiscThoughts opens.
There is a single unbound field on frmGetMiscThoughts named txtMiscThoughts. I want the value the user types in this box to be recorded in the field MiscThoughts in tblCampingTrip.
Right now, entering data and clicking Save and Exit results in nothing.
I believe that at this point the record from frmCampingTrip is already saved in tblCampingTrip.
There is a "Save and Exit" button on frmGetMiscThoughts.
Would an append query attached to that command button's On Click event record the value in txtMiscThoughts to tblCampingTrip?
Is there a better way to accomplish this given 1) subforms are out of the question at this point and 2) this really does exactly represent our real world workflow.
Thanks a bunch,
Tim