In Line:
Is this going to cause a problem?
Only you can know. A record is no longer *new* when it has been saved!
IF YOU HAD A DIRTY NEW RECORD THEN IT IS NO LONGER A NEW RECORD BECAUSE OF
THE CODE ABOVE.
The code below:
Me.OtherControlName.SetFocus '-- Use YOUR OtherControlName of course.
Me.AddQsts.Enable = FALSE
is causing an error message "Run-time error '2164' " " You can't disable a
control while it has the focus."
Let's go with the Public variable idea.
LockTheButton = True
Me.OtherControlName.SetFocus '-- Use YOUR OtherControlName of course.
And then in the OtherControlName GotFocus event:
If LockTheButton Then
Me.AddQsts.Enable = FALSE
End If
YOU WILL NEED TO DEFINE THE VARIABLE BEFORE ANY FUNCTIONS IN THE CODE MODULE.
Dim LockTheButton As Boolean
...and then depending on how your form works you may want to set it false in
the Current event of the form.
I set the focus to my other control name and the cursor "lands" there but I
cannot add the score.
Thanks.
[quoted text clipped - 51 lines]
user can keep adding the same records. Can someone please tell me how to do
that?
--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.
Message posted via AccessMonster.com