Ok guys and gals,
I have created an Access 2000 database with a few tricky macros. Since I am not one with VB, everything has been created using macros to move in and out of queries and open forms and such.
One particular macro that I have, copies information from a table, opens a query, pastes the information into a table, then opens a form so the macro can evaluate the data. Depending on the value in the form, the macro either continues on or stops. The macro itself works like a charm and does precisely what I want it to do. However, and you knew this was coming, when the macro runs it flashes through all the steps and you can visibly see them on the monitor. Now I know what some savvy Access user might suggest I open some of my forms in a "Hidden" window form. Well, for some reason the macro chokes and does not work when I tried to set it up that way. That solution would only help with the opening and closing of forms and wouldn't do me any good for the queries or tables.
I hope I have given enough info here to get some help. If the only way around this is using VB then most likely I'm stuck with the flashing windows, but if anyone could help, I would be very greatful!!
Blimey! you have a form based on a table that contains the results of a query run by a macro connected to the thighbone…
Maybe there’s a reason why you haven’t, but on the face of it, I would suggest defining the query as the data source for the form; opening the form will run the query and populate the fields directly
Mangetout,
I definitely see your point here, but unfortunately in Access 2000 the macro itself has a repeat expression that can only be referenced to a form. That’s why I had to create the form. I realize it’s jumping through hoops here but I had to get creative to make it do what I wanted without using VB.
Even as I look at your suggestion, that still would not solve the problem of my “flashing”.
Is it running a series of make/append queries? (poetry, no less)
If so, you might get better results running queries based on query results (instead of queries based on tables) - did you know you can do this?
Yes it is running a few paste/append queries. Yep, I know you can make queries based off of the results of other queries. Either way, I still need to find a way to cease the flashing.
The flashing is a pretty much intrinsic part of the way that Access runs macros that call queries, however, if you don’t need the toolbars or Access window (only your form), and you only have the one form, then this might work for you:
In your database, click Tools>Startup and tell it to launch your form on startup (NB: I’m testing this in A97, so it might be a different menu in A2K)
Open your form in design view and in the properties, set Pop Up and Modal to ‘Yes’
You do need a tiny bit of code; in your form’s properties, in the Events tab, click on the On Close event, then click the button with three dots and select Code Builder
In the code window (the cursor will be in just the right place automatically), type DoCmd.Quit
Close the code window, save and close the form.
Set up a shortcut to your database on the desktop
Right click on the shortcut icon and select Properties, then tell the shortcut to run minimized.
Phew
What should now happen is that when you launch the shortcut, access disappears down onto the taskbar and your form appears directly on top of the desktop.
You can get it to work with more than one form, but you need to set them all up as pop up and modal; the modal property makes it only possible to interact with the form that is on top, so you have to build in a way of navigating between/closing/launching forms
Oh, also, if you have trouble getting into design mode after following the above instructions, hold down shift as you launch the shortcut.