F
FatMan
Hi all:
I hope one of the Access gurus out there can help me with my problem. The
code below gets a runtime error on one of our grower's computer (32 Bit Vista
- Home Prem.). The code was developed on a computer running WinXP Pro - SP 2
and Access 2000. The installation included a copy of the access runtime.
What I don't understand is what would causes the runtime error on the vista
machine. Can anyone help? It seems like simple code to me with nothing to
difficult going on so why the runtime error?
Any help is greatly appreciated.
Thanks,
FatMan
Code:
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
Dim stDocName As String
If Me.labProfileLocked.Visible = Flase Then
'set warrnings off
DoCmd.SetWarnings False
'delete previous profile and append selected profile
stDocName = "qryGrowerProfileDel"
DoCmd.OpenQuery stDocName, acNormal, acEdit
stDocName = "qryGrowerAppend"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'lock down form
Me.AllowAdditions = False
Me.AllowEdits = False
Me.AllowDeletions = False
Me.labProfileUnLocked.Visible = False
Me.labProfileLocked.Visible = True
Me.Requery
'create grower block info table
stDocName = "qryBlockInforGrowerDelete"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'create grower block info table
stDocName = "qryBlockInfoGrower"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'set warnings on
DoCmd.SetWarnings Ture
Else
MsgBox "Sorry the form must be unlocked to load Grower Profile.",
vbInformation + vbOKOnly, "Grower Profile: Locked!"
End If
'set warnings on
DoCmd.SetWarnings True
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub
I hope one of the Access gurus out there can help me with my problem. The
code below gets a runtime error on one of our grower's computer (32 Bit Vista
- Home Prem.). The code was developed on a computer running WinXP Pro - SP 2
and Access 2000. The installation included a copy of the access runtime.
What I don't understand is what would causes the runtime error on the vista
machine. Can anyone help? It seems like simple code to me with nothing to
difficult going on so why the runtime error?
Any help is greatly appreciated.
Thanks,
FatMan
Code:
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
Dim stDocName As String
If Me.labProfileLocked.Visible = Flase Then
'set warrnings off
DoCmd.SetWarnings False
'delete previous profile and append selected profile
stDocName = "qryGrowerProfileDel"
DoCmd.OpenQuery stDocName, acNormal, acEdit
stDocName = "qryGrowerAppend"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'lock down form
Me.AllowAdditions = False
Me.AllowEdits = False
Me.AllowDeletions = False
Me.labProfileUnLocked.Visible = False
Me.labProfileLocked.Visible = True
Me.Requery
'create grower block info table
stDocName = "qryBlockInforGrowerDelete"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'create grower block info table
stDocName = "qryBlockInfoGrower"
DoCmd.OpenQuery stDocName, acNormal, acEdit
'set warnings on
DoCmd.SetWarnings Ture
Else
MsgBox "Sorry the form must be unlocked to load Grower Profile.",
vbInformation + vbOKOnly, "Grower Profile: Locked!"
End If
'set warnings on
DoCmd.SetWarnings True
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub