AOB
Registered User.
- Local time
- Today, 12:17
- Joined
- Sep 26, 2012
- Messages
- 637
Hi guys,
I have a form which has 8 textboxes representing the earliest and latest dates of records available in 4 (independent) tables. The textboxes are locked / disabled; they are purely there for informational purposes, so users know what range of dates have been imported when the form is loaded.
I was using simple domain aggregate functions as the control source for each textbox, e.g. :
And switching DMin for DMax (to get the latest rather than the earliest date) and the table and field names as appropriate
This worked fine when the DB was a standalone but when I split it, the form takes an absolute age to load (and recalculate, after the import process is run)
Looking into it, the general advice for split databases seems to be to avoid domain aggregate functions (according to this article anyway)
But it doesn't suggest a suitable alternative? The only thing I could think of was to create a query for each date, along the lines of :
And bind each textbox to its corresponding query. But this is just as slow, if not, in fact, slower?
So I was wondering if anybody could suggest the 'correct' way of doing this? All I want is the smallest or largest date in one (indexed) field in each table - surely not a big ask and something which should be possible to set up to run relatively quickly, no?
Thanks
Al
I have a form which has 8 textboxes representing the earliest and latest dates of records available in 4 (independent) tables. The textboxes are locked / disabled; they are purely there for informational purposes, so users know what range of dates have been imported when the form is loaded.
I was using simple domain aggregate functions as the control source for each textbox, e.g. :
Code:
=Nz(DMin("[BalanceDate]","[tblBalances]"),"")
And switching DMin for DMax (to get the latest rather than the earliest date) and the table and field names as appropriate
This worked fine when the DB was a standalone but when I split it, the form takes an absolute age to load (and recalculate, after the import process is run)
Looking into it, the general advice for split databases seems to be to avoid domain aggregate functions (according to this article anyway)
But it doesn't suggest a suitable alternative? The only thing I could think of was to create a query for each date, along the lines of :
Code:
SELECT Min([tblBalances].[BalanceDate]) AS EarliestBalance
FROM [tblBalances]
And bind each textbox to its corresponding query. But this is just as slow, if not, in fact, slower?
So I was wondering if anybody could suggest the 'correct' way of doing this? All I want is the smallest or largest date in one (indexed) field in each table - surely not a big ask and something which should be possible to set up to run relatively quickly, no?
Thanks
Al