Hello,
I am doing various checks when an Access app is opened (user credentials, linking tables from SQL server, updating currency rates, etc...).
I want to display a "welcome init" form which will inform the user about what's going on, so the app does not look like it's frozen.
I currently have something like this:
The problem is that this doesn't work properly. The "txtProgress" doesn't at all show the first message "Connecting to database...". It runs the "LinkSQLTables" sub, freezes for a while and then it shows "Verifying user credentials...". I have no idea why, I even tried to pause the code execution between each step, using kernell function "Sleep", but that didn't help either.Code:Option Compare Database Option Explicit Private Sub Form_Load() Me.TimerInterval = 1 Me.cmdOK.Visible = False Me.cmdClose.Visible = False Me.txtProgress.Visible = False End Sub Private Sub Form_Timer() Me.TimerInterval = 0 Me.txtProgress.Visible = True Me.txtProgress.Value = "Connecting to database..." LinkSQLTables Me.txtProgress.Value = "Verifying user credentials..." If UserLogin() = False Then Me.txtProgress.Value = "User authorization failed, cannot start the application!" Me.cmdClose.Visible = True Exit Sub End If Me.txtProgress.Value = "Updating bank transactions..." Connect UpdateBankTransactions (1) UpdateBankTransactions (3) Me.txtProgress.Value = "Updating currency exchange rates..." UpdateCurrencyExchangeRate (2) UpdateCurrencyExchangeRate (3) UpdateCurrencyExchangeRate (4) Disconnect If Not IsNull(TempVars("EmployeeID")) Then Me.txtProgress.Value = "User successfully verified: " & TempVars("EmployeeName") Me.cmdOK.Visible = True Me.cmdClose.Visible = False Else Me.txtProgress.Value = "Error!" Me.cmdClose.Visible = True Me.cmdOK.Visible = False End If End Sub
What should I do to achieve this in Access? Thank you.
Tomas