We've used a simple 2003 Access DB under XP for years and just upgraded to Win 7 w/ Access 2010. Everything works fine except for one routine. It's part of an office sign in / out form that edits a table of staff members to track who's here and who's not. Since the upgrade, we get an error and can't sign in. We can edit the table fine (a signing out form) but the when we attempt to sing in, the following error pops:
Error, you did not sign in. Microsoft Access can't move the focus to the control InOut. You entered a number that does not exist
I know some remedial Access programming and even less of Visual Basic, but I'm trying and I follow directions pretty well. Near as I can tell, 2010 doesn't like something that 2003 could live with.
The is the script that I believe is running.
Thanks for any guidance.
Option Compare Database
Option Explicit
Dim StaffNumber As String
Private Sub Form_Load()
'TimerInterval = 3000
End Sub
Private Sub Form_Open(Cancel As Integer)
On Error GoTo SignIn_Form_Open_Err
Dim Message, Title As String
Message = "Enter your caseload number."
Title = "SignIn Screen."
StaffNumber = InputBox(Message, Title)
Me.Filter = "[StaffNum] = '" & StaffNumber & "'"
Me.FilterOn = True
InOut.SetFocus
InOut.Text = "In"
DutyStaff.SetFocus
DutyStaff.Text = ""
TimeBackIn.SetFocus
TimeBackIn.Text = ""
ExtendedAbsence.SetFocus
ExtendedAbsence.Value = False
ExtRetDate.SetFocus
ExtRetDate.Text = ""
Notes.SetFocus
Notes.Text = ""
TimeBackIn.SetFocus
DoCmd.Close
Exit_Form_Open:
Exit Sub
SignIn_Form_Open_Err:
MsgBox "Error, you did not sign in. " & Err.Description & " You entered a number that does not exist"
Me.Undo
DoCmd.Close acForm, "SignInForm", acSaveNo
Exit Sub
End Sub
Private Sub Form_Timer()
'Me.Undo
'DoCmd.Close acForm, "SignInForm", acSaveNo
End Sub