Vista Run-Time error 70, Permission Denied

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

Has anyonoe found an easy way to deal with this error yet? It happens when
using the "SendKeys" in a funcntion such as the one shown below. This code
ran perfect under WinXP. I came across this blog, but I'm wondering if there
is a better way to handle it. Looks like MS has known about this for over a
year.

http://blogs.msdn.com/davbosch/archive/2006/02/26/539470.aspx

*******************************************
Private Sub Form_Load()

Me!cmdDataSheet.Visible = False
Me!lblDatasheetviewonScreen.Visible = False

'Move the focus to the list box and highlight the first query

If Not IsNull(Me.OpenArgs) Then

Select Case Me.OpenArgs
Case "R"
Me.ogrQRB = 1
Case "Q"
Me.ogrQRB = 2
Case "B"
Me.ogrQRB = 3
Case Else
MsgBox "Form " & Me.Name & " was passed incorrect OpenArgs
'" & _
Me.OpenArgs & "'.", vbCritical, "Cannot Continue"
DoCmd.Close

End Select

SetupList (Me.OpenArgs)
Else
SetupList "R"
End If

SendKeys "{Down}"

End Sub
*******************************************

Private Sub cmdNew_Click()

On Error GoTo Err

DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "txtClientName"
SendKeys "{F4}", False

ExitErr:
Exit Sub

Err:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ExitErr

End Sub
*******************************************

Thanks,

Ken
 
I don't know about Vista, but it doesn't suprise me. I understand AC2007 no
longer supports Sendkeys.
Sendkeys is an archaic command that should be avoided.
 
Back
Top