Re: Running Update Macro disables switchboard
- From: Steve Schapel <schapel@xxxxxxxxxxx>
- Date: Tue, 17 Jun 2008 15:29:46 +1200
Smilin Jack,
Do you have an action at the end of the macro to reset Echo on?
By the way, not related to your problem I think, but these actions:
OpenTable
RunCommand [SelectAllRecords]
RunCommand [Delete]
… could be replaced by a single OpenQuery action to run a Delete Query.
What are the reports and query that you are deleing and importing? Are the imported objects different from the deleted ones? Just curious, but can't imagine why you would be doing this.
--
Steve Schapel, Microsoft Access MVP
Smilin Jack wrote:
Steve -.
The macro begins with 'setwarnings' to 'no,' and echo turned off. It then deletes several reports & 1 query using the 'delete object' command.
Next, it runs a saved import, bringing the replacement data into new tables in the database. The import also includes replacement reports and the replacement query.
It then runs several sets (4) of the following:
OpenTable
RunCommand [SelectAllRecords]
RunCommand [Delete]
OpenQuery [Append Query] (this is from the imported data)
Close [Table]
Next, it runs 4 deletes:
DeleteObject [Imported Tables]
Lastly, a message box:
MsgBox ['Updates Complete']
As mentioned in my first message, I placed a final line in ['Exit'] to close the database, as a work around.
I had originally placed command buttons for these macros (2 - not exactly the same, but similar - both causing the same error) on the switchboard, but the system completely locked up after running them. I settled for leaving them in the navigation pane as a double click. That way I can at least close the database properly - the only issue is that none of the switchboard commands work. After re-opening the database, everything works as it should, and the updates are in place.
- Follow-Ups:
- Re: Running Update Macro disables switchboard
- From: Smilin Jack
- Re: Running Update Macro disables switchboard
- References:
- Re: Running Update Macro disables switchboard
- From: Steve Schapel
- Re: Running Update Macro disables switchboard
- From: Smilin Jack
- Re: Running Update Macro disables switchboard
- Prev by Date: Re: Which button was clicked
- Next by Date: Re: Comparing control value to query result
- Previous by thread: Re: Running Update Macro disables switchboard
- Next by thread: Re: Running Update Macro disables switchboard
- Index(es):
Relevant Pages
|