I have two tables, tblCustomers and tblMachines, now all machines should belong to a customer (foreign key), but due to a table design oversight some machines are orphans.
In order for my client to find these I have inserted a routine at the switchboard "form current" event to check for orphans, and count them, this total is then shown on a label caption with a command button.
The command button opens a form to show an orphan machine record, and also customers with the same address, the client selects the correct customer and the record is corrected.
When the orphan form is closed the switchboard reappears, but the total number of orphans is unchanged unless the form is manually closed and reopened.
I have tried to refresh/requery immediately before docmd.close on the orphan form, but without success.
Should I put the routine in a different form action? or is there a proper/different way?
Telephoto
(Sometimes I feel I'm getting too old for all this...)
In order for my client to find these I have inserted a routine at the switchboard "form current" event to check for orphans, and count them, this total is then shown on a label caption with a command button.
The command button opens a form to show an orphan machine record, and also customers with the same address, the client selects the correct customer and the record is corrected.
When the orphan form is closed the switchboard reappears, but the total number of orphans is unchanged unless the form is manually closed and reopened.
I have tried to refresh/requery immediately before docmd.close on the orphan form, but without success.
Should I put the routine in a different form action? or is there a proper/different way?
Telephoto
(Sometimes I feel I'm getting too old for all this...)