How To Restrict User Entering Record Thru Form

Ashfaque

Search Beautiful Girls from your town for night
Local time
Today, 23:34
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
 
Last edited:
Set the Allow Additions property of the form to no.
 
You should check out the Search function of this site. It works great!

You might have found this freebie... A better mouse trap?
It will show you how to solve your problem.
 
In form property find "Cycle" and set it to "Current Record"
That is it.
 

Users who are viewing this thread

Back
Top Bottom