A better mouse trap...

hardy1976

Still learning...
Local time
Today, 12:07
Joined
Apr 27, 2006
Messages
200
Hi,

I need a way at preventing users from using the scroll funtion on mouses from creating a multitude of balnk records and hence was looking at ghudson better mouse trap as a way of doing this... this is the way forward isnt it?

Looking at the code it starts with...
'For those of us not using Access XP, we have a challenge to prevent
'our users from advancing to another record if they do not use the controls
'we want them to use or to prevent them from bypassing our validation
'procedures too ensure the current record is okay to be saved.

How do you prevent this from happening in Access XP?? Access XP = 2002 does it not?

Regards
H.
 
It will work just fine in all versions of Access [95/97/2000/2002/2003].
 
Thanks, I've got it working, well almost!!!

Previously on my sub-sub form I could create an ever growing amount of blank records which your cool solution has now limited to one, the question is how do I stop it from create this one blank record?

What I have is a main form - Company details, in which I have a sub form payment total in which I have sub form which is payment details (the breakdown).

When I enter the the sub sub form to enter payment details I can scroll through previous records and then create one blank record before it stops any more being created...

Will the solution work when you have multiple tables linked to the form?
 
I suggest that you set one or more fields in the design of the table to "required" and/or a Primary Key. Access will not let a new record [blank or incomplete] be saved if all of the required fields are not completed. You should get a runtime error in the form [subform] if the record attempts to be saved but all of the required fields are not completed. You can also use the form and subforms BeforeUpdate event to test if all of the required fields are completed and then you can Cancel the BeforeUpdate event if the validation test = False.
 

Users who are viewing this thread

Back
Top Bottom