bwyrwitzke
Registered User.
- Local time
- Today, 15:50
- Joined
- Nov 11, 2002
- Messages
- 50
This is a little unusual and I'm probably going about it in the wrong way but I'm still hoping someone out there can help...
I have a main form (frmMain) with 3 subforms (subfrm_DE, subfrm_Today, subfrm_History).
frmMain - Has all the customer details
All of the subforms are based on the same table/query and list purchase info for that customer.
Subfrm_DE - Is for data entry only (no problems)
Subfrm_Today - Shows the records added today (problems!)
Subfrm_History - Shows all of the records for that customer (no problem)
When a new record is added on subfrm_DE, the following code is used to updated the other subforms:
Subfrm_Today onload uses the following code to filter for records created today:
Everything works great IF there's already a record with today's datestamp. If not, it shows the records from the most recent entry, AND it will not update with the new records unless you back all the way out and reload the frmMain.
Any idea how to:
1. Ensure ONLY the records from today are shown in subfrm_Today
2. If there are no records, update subfrm_Today once a new record is added
I've tried an assortment of load, requery, and refresh statements and have not been able to get the "filter" to run again.
Thanks everyone. I appreciate the help.
Bruce
I have a main form (frmMain) with 3 subforms (subfrm_DE, subfrm_Today, subfrm_History).
frmMain - Has all the customer details
All of the subforms are based on the same table/query and list purchase info for that customer.
Subfrm_DE - Is for data entry only (no problems)
Subfrm_Today - Shows the records added today (problems!)
Subfrm_History - Shows all of the records for that customer (no problem)
When a new record is added on subfrm_DE, the following code is used to updated the other subforms:
Code:
Forms!frmMain.Form.subfrm_History.Requery
Forms!frmMain.Form.subfrm_Today.Requery
Me.Recalc
Subfrm_Today onload uses the following code to filter for records created today:
Code:
Me.Filter = "((qryFills.[Fill Date]=#" & Date & "#))"
Me.FilterOn = True
Everything works great IF there's already a record with today's datestamp. If not, it shows the records from the most recent entry, AND it will not update with the new records unless you back all the way out and reload the frmMain.
Any idea how to:
1. Ensure ONLY the records from today are shown in subfrm_Today
2. If there are no records, update subfrm_Today once a new record is added
I've tried an assortment of load, requery, and refresh statements and have not been able to get the "filter" to run again.
Thanks everyone. I appreciate the help.
Bruce