Debugging?

cliffsimms

Registered User.
Local time
Today, 13:52
Joined
Sep 28, 2000
Messages
18
I placed this code in the OnOpen and get a bug error
2110
Microsoft Access cannot change focus to control SeatsAvailable.


Private Sub Form_Open(Cancel As Integer)
Dim intSeats As Integer

[SeatsAvailable].SetFocus
If Val([SeatsAvailable].Text) < 1 Then
MsgBox "Sorry, no more seats are available."
Command32.SetFocus
Exit Sub
Else
intSeats = Val([SeatsAvailable].Text)
intSeats = intSeats - 1
[SeatsAvailable].Locked = False
[SeatsAvailable].Text = intSeats
[SeatsAvailable].Locked = True
Command32.SetFocus
End If
End Sub

Any idea whats wrong???
 
What kind of control is SeatsAvailable ?
Has the SeatsAvailable control got any code associated with it ?
 
Is the SeatsAvailable control:
Enabled?
Visible?
On the current form?

Mike
 

Users who are viewing this thread

Back
Top Bottom