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).