Re: preventing records to be scrolled with the mouse wheel in Edit
From: Marshall Barton (marshbarton_at_wowway.com)
Date: 11/22/04
- Next message: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Previous message: Ken Snell [MVP]: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- In reply to: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Next in thread: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Reply: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Nov 2004 22:37:49 -0600
>> I believe the DataEntry and AllowAdditions properties will
>> take care of all that. Setting them both to True will only
>> display the new record and setting them to False will only
>> display existing records.
>
>
max wrote:
>This is definively a good solution for the "NewRecordMode". But what can I
>do for the EditMode? the DataEntry porperty set to yes will prevent the user
>to see and edit existing records... i just need to prevent the scroll. Do
>you think it is possible?
Sorry, I misread the original question and thought it was
only the new record situation where you wanted to prevent
scrolling.
In general, I prefer to prevent users from seeing other
records by setting the form's Record Source to a query that
only has the one record in its dataset. So the code in the
Edit button's Click event would then look like:
Me.DataEntry = False
Me.AllowAdditions = False
Me.RecordSource = "SELECT * FROM table " _
& WHERE ID=" & me.txtID
The View button would have to reset the RecordSource to your
original table/query as well as setting AllowEdits, etc.
I've never tried it, but I imagine it would also be possible
to use code in the form's BeforeUpdate event procedure that
checks a flag variable to verify that the Save button
(assuming you have one) was used or Cancel the update if it
wasn't. This way, the form will not be able to navigate
until the changed record has been saved.
-- Marsh MVP [MS Access]
- Next message: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Previous message: Ken Snell [MVP]: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- In reply to: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Next in thread: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Reply: max: "Re: preventing records to be scrolled with the mouse wheel in Edit"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|