chuckcoleman
Registered User.
- Local time
- Today, 16:16
- Joined
- Aug 20, 2010
- Messages
- 377
Hi.
Background: Reportfrm has command buttons on it to open various forms and reports. The Startupsfrm shows by town by date the number of orders that are scheduled. The Orderfrm allows work order requests to be added. The user looks at what their customer has requested as a date and on the Startupsfrm looks how many orders are already in the system for that date and town. The user then makes a decision about what date to enter into the system.
From the Reportfrm, I use a command button to open a form called Startupsfrm. The Startupsfrm form doesn't have a record source in the properties. The code below opens the Startupsfrm form and establishes the record sources, (there is also a subform in the Startupsfrm). That all works fine, and the two forms show the records that have been added before the form opens.
On another form, Orderfrm, while the Startupsfrm is still open, additional records are added based on what the customer is asking for. There is a command button on the StartupsFrm that I added the same lines below that are used to open the form from the Reportfrm.
On the Orderfrm after a record is added and the Startupsfrm is still open, the data doesn't change, (At this point I don't expect it to change). However, when I click on the Command button with the code above, the form and subform both go blank, no records are shown.
How do I get the records to update showing the current record information?
Thanks, Chuck
Background: Reportfrm has command buttons on it to open various forms and reports. The Startupsfrm shows by town by date the number of orders that are scheduled. The Orderfrm allows work order requests to be added. The user looks at what their customer has requested as a date and on the Startupsfrm looks how many orders are already in the system for that date and town. The user then makes a decision about what date to enter into the system.
From the Reportfrm, I use a command button to open a form called Startupsfrm. The Startupsfrm form doesn't have a record source in the properties. The code below opens the Startupsfrm form and establishes the record sources, (there is also a subform in the Startupsfrm). That all works fine, and the two forms show the records that have been added before the form opens.
On another form, Orderfrm, while the Startupsfrm is still open, additional records are added based on what the customer is asking for. There is a command button on the StartupsFrm that I added the same lines below that are used to open the form from the Reportfrm.
Code:
DoCmd.OpenForm stDocName, acNormal
Forms![Customers who need startups by RequestedDD].RecordSource = "Customers who need winterized by DD-2"
Forms![Customers who need startups by RequestedDD].[Winterization Totals by DateX].Form.RecordSource = "Customers who need winterized by DD-2 Total by Date"
On the Orderfrm after a record is added and the Startupsfrm is still open, the data doesn't change, (At this point I don't expect it to change). However, when I click on the Command button with the code above, the form and subform both go blank, no records are shown.
How do I get the records to update showing the current record information?
Thanks, Chuck