How to display a form when applicaiton is updating

  • Thread starter Thread starter Don Pickering
  • Start date Start date
D

Don Pickering

I am running Access 2000 on Windows 2000 Pro service pack 4.
The .mdb performs a long update. I want to tell the user to wait while the
application is running.
If I use a form to do this the application stops until the form is gone.
How can I display something while the application is updating?
 
I've opened the form,
Then ran the code from that form.
Also use the status bar to show progress of looped routines - so if the
application appears to be locked the status bar graph should progress, or
the text will change. I notice text in forms does not change straight away.
 
Form1:
Docmd.openform "ImportExportScreen"
me.visible = false

OnTimer_ImportExportScreen
TimerInterval = 0
CancelBut.Caption = "Active"
Description.setfocus
'Run the import process
'Set Status bar with the graph maximum value set to dateto
If isdate(datefrom) and isdate(dateto)
If datefrom <= dateto
Counter = datefrom
'While counter < dateto
'Update statusbar with the value of counter
Terminal = !terminal
Branch = !branch
Description = Branch & " " & Terminal & format(counter,"short date")
'Because the description box updates randomly (a few seconds after the date
changes), I rely on the status bar.
'Check that file exists
'Import the file where filename = "A" & right(year(counter),2) &
format(month,"00") & fomat(day,"00") & ".QDF"
Counter = counter + 1
wend
'there is a lot more code to import different types of files.
'When a query is executed it automatically displays the graph of progress
'There is a funtion that just displays plain text in the status bar - but I
can't remember where and if I have use that
'Remove status bar
endif
endif

Actually I use the status bar for when I open the database and the database
detects that the directory I am using has changed from the previous time it
has opened:
I detect how many tables are in the database and then run a loop to
reconnect to the linked tables. Instead of thinking the database has been
locked for a minute or so - I can see the status bar graph progress
increase - sometimes there's big jumps - that would be because there was a
lot of internal tables the routine has skipped over. I have over 100 tables
according to this (must be built in ones that Access uses as there's not
even that many on the table window).
 
Back
Top