Ashfaque
Search Beautiful Girls from your town for night
- Local time
- Tomorrow, 04:10
- Joined
- Sep 6, 2004
- Messages
- 897
Hi All,
I need to restrict my user not to use any 'Next' command button or use Mousewheel to enter new record.
I want him to enter new record only using ADD command placed on form.
To do this, I created as Private sub named P_Lock() to lock required text boxes. Then I called this sub in OnCurrent event of the form as follows
If (Me.NewRecords) Then
P_Unlock ' Sub to lock all the text boxes on form.
Else
P_Lock ' Another sub created to unlock all the text boxes on form.
End If
It works well. When user nevigates within the records, he can not overwrite into current records. This is fine.
But even though I wrote this code, a new record can still be entered if user moves to last record (using mousewheel or nevigation) when control is on blank new record.
Can somebody let me know how can I restrict this ?
Sugestions are welcome.....
With kind regards,
Ashfaque
I need to restrict my user not to use any 'Next' command button or use Mousewheel to enter new record.
I want him to enter new record only using ADD command placed on form.
To do this, I created as Private sub named P_Lock() to lock required text boxes. Then I called this sub in OnCurrent event of the form as follows
If (Me.NewRecords) Then
P_Unlock ' Sub to lock all the text boxes on form.
Else
P_Lock ' Another sub created to unlock all the text boxes on form.
End If
It works well. When user nevigates within the records, he can not overwrite into current records. This is fine.
But even though I wrote this code, a new record can still be entered if user moves to last record (using mousewheel or nevigation) when control is on blank new record.
Can somebody let me know how can I restrict this ?
Sugestions are welcome.....
With kind regards,
Ashfaque
Last edited: