Multi-Page Form - Paging Down

DBFIN

Registered User.
Local time
Today, 06:13
Joined
May 10, 2007
Messages
205
I've created a complex form with several pages within the same form. The "Allow Additions" property is "Yes", which allows one to enter one record at a time. If anyone mistakenly uses the pagedown button on their keyboard, the form automatically saves the record before the data entry is completed. I've already created pageup and pagedown commands to discourage use of these buttons on the keyboard, but this is no guarantee.

Question: How can I prevent the user form mistakenly saving a record when the pagedown button is clicked ?
 
Program the event me.BeforeInsert if you are using bound forms. Which you are otherwise there wasn't a problem, duh.

Share and Enjoy!
 
Multi-Page Forms - Paging Down

I created a cancel/event macro and input this macroname as an event in the "On Key Up" and "On Key Down" form properties to prevent a record update when the user pushs the key up or key down button. This did not work.

I also tried a similar approach, but input the macroname as an event in the "Before Insert" form property, but this prevents any data entry when the user clicks on any of the bound text boxes. This did not work.

I'd appreciate any help with this issue. My goal is to prevent record update when the user pushs the key up or key down buttons.
 
BeforeUpdate en BeforeInsert hebben beide een Cancel argument. Die moet je op true zetten om te voorkomen dat een record wordt geupdate resp. geinsert.

Code:
Private Sub Form_BeforeInsert(Cancel As Integer)
    If inputnietgoed Then Cancel = True
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
    If inputnietgoed Then Cancel = True
End Sub

HTH:D
 

Users who are viewing this thread

Back
Top Bottom