M
Michelle
I have on my switchboard and update button that runs the following code.
What I would like is when I click the button it shows a "warning update
please wait" box then once the code runs it closes the pop up. I crated a
form and called it frmUpdateDBMsg here is the code I have and the error it is
going me.
Private Sub Command25_Click()
DoCmd.SetWarnings False
DoCmd.OpenForm acForm, "frmUpdateDBMsg"
CurrentDb.QueryDefs("qurinmtinfoAppend").Execute dbFailOnError
CurrentDb.TableDefs.Refresh
DoEvents
CurrentDb.QueryDefs("qurOldInmates").Execute dbFailOnError
CurrentDb.TableDefs.Refresh
DoEvents
CurrentDb.QueryDefs("qurDeleteOldInmates").Execute dbFailOnError
CurrentDb.TableDefs.Refresh
DoCmd.Close acForm, "frmUpdateDBMsg"
DoEvents
DoCmd.SetWarnings True
CurrentDb.TableDefs.Refresh
DoEvents
End Sub
*** Run-time error'13':
Type mismatch....
When I click Debug it highlights this line of code....
DoCmd.OpenForm acForm, "frmUpdateDBMsg"
What I would like is when I click the button it shows a "warning update
please wait" box then once the code runs it closes the pop up. I crated a
form and called it frmUpdateDBMsg here is the code I have and the error it is
going me.
Private Sub Command25_Click()
DoCmd.SetWarnings False
DoCmd.OpenForm acForm, "frmUpdateDBMsg"
CurrentDb.QueryDefs("qurinmtinfoAppend").Execute dbFailOnError
CurrentDb.TableDefs.Refresh
DoEvents
CurrentDb.QueryDefs("qurOldInmates").Execute dbFailOnError
CurrentDb.TableDefs.Refresh
DoEvents
CurrentDb.QueryDefs("qurDeleteOldInmates").Execute dbFailOnError
CurrentDb.TableDefs.Refresh
DoCmd.Close acForm, "frmUpdateDBMsg"
DoEvents
DoCmd.SetWarnings True
CurrentDb.TableDefs.Refresh
DoEvents
End Sub
*** Run-time error'13':
Type mismatch....
When I click Debug it highlights this line of code....
DoCmd.OpenForm acForm, "frmUpdateDBMsg"