Results 1 to 5 of 5

Thread: record locks

  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    indiana
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    record locks

    hi all
    is there a way to prevent the user from scrolling through records? i have a form in which the user enters information, and i don't want them to go to other records (the form opens and then goes to "add new record"). should i be approaching this differently for a form that only enters information?

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record locks

    in the forms properties set the cycle property to current record instead of all records

  3. #3
    2 Star Lounger
    Join Date
    May 2001
    Location
    indiana
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record locks

    sounds like that should work, but when i changed it to that absolutely nothing changed..... i could still scroll through records <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15>

  4. #4
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    La Verne, California, USA
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record locks

    I'd make a copy of the form you have and set it in design view for Data Entry so that it doesn't load all the records and merely allows new entry. I'd put this form in an autoexec macro so that it opens for the user when the db is first opened.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: record locks

    I avoid the problem entirely by forcing the user to select a record (usually with an unbound combobox) and then setting the form's recordsource to a select statement that returns only that record. They have nowhere to scroll then, and setting the Cycle property to current record keeps them from accidentally creating a record by tabbing through the end of the current one or using the page down key.

    The trick to this is in loading the form itself with an empty recordset. You do that by setting the default recordsource property to a statement that always evaluates to false, like "SELECT * FROM MyTable WHERE 1=2". That allows you to bind all the controls to the appropriate fields but doesn't load any records. When you reset the recordsource in code, you get the record returned by the new select statement.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •