Re: preventing records to be scrolled with the mouse wheel in Edit

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Marshall Barton (marshbarton_at_wowway.com)
Date: 11/22/04


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]


Relevant Pages

  • Re: Using Screen
    ... Lets say, I started a job on a computer, if you must know, portmanager ... wouldnt matter) and bring that process to either screen, or my ssh ... The watch utility will only display writes that happen after it was ... And to answer your original question, no I don't think there's a way to bring ...
    (freebsd-questions)
  • Re: OE Messages lost (ref: Hagen)
    ... >I would need to see your original question to elaborate on it. ... >> even though the size of the folders suggest ... >> Now, in Hagen's directions, what is meant ... >> will simply not display. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Tracking changes - author colour colour changing
    ... I am not sure this is answering the original question, and I seem to have the ... they display in red, I then save it and re-open the doc the next day and ... "Stefan Blom" wrote: ...
    (microsoft.public.word.docmanagement)
  • Re: preventing records to be scrolled with the mouse wheel in Edit
    ... > I believe the DataEntry and AllowAdditions properties will ... > take care of all that. ... > display existing records. ... Hi Marsh, ...
    (microsoft.public.access.formscoding)
  • Re: Stay in same record on errors
    ... Use the BeforeUpdate event procedure of the *form* to validate the record, ... > I have a continious form where I check the users input when then enter a ... If the input is not valid I display a message telling them what ... My problem is that I want the cursor to remain in the same record ...
    (microsoft.public.access.forms)