Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Australia
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Locked Form but able to Filter (2003/(11.6355.6360) SP1)

    My database has a form that the users can view as View Only but there is the need to allow them to either Filter by Form to find a contact name in a text field or to right click the field and use the Filter For: option.

    Neither can be done when the form is View Only (through VBA) - any suggestions please?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Locked Form but able to Filter (2003/(11.6355.6360) SP1)

    If you set the Recordset Type property of the form to Snapshot in design view, the users won't be able to modify, add or delete records, but they will be able to filter any way they like.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Locked Form but able to Filter (2003/(11.6355.6360) SP1)

    Hans,

    I have never known about this property setting. I always used to change the allow edits, deletions and additions to false and allow filters to true. This has the same effect where I can filter the records, but not modify them.

    How does the snapshots approach compare to the method above? Is it more effective, or better to use...or is it similar to the method I mension above!
    Regards,
    Rudi

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Locked Form but able to Filter (2003/(11.6355.6360) SP1)

    There is an essential difference:
    <UL><LI>If you set Allow Edits to No, all controls on the form will be locked, including unbound controls. This means that you can't use an unbound text box or combo box to search for records.
    <LI>If you set Recordset Type to Snapshot, only bound controls will be locked; unbound controls can still be edited, so they can be used to search for records.
    Moreover, Snapshot also disables adding new records and deleting existing ones, so you make the form read-only as far as the record source is concerned with one setting.[/list]For this reason, I prefer setting Recordset Type to Snapshot.

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Locked Form but able to Filter (2003/(11.6355.6360) SP1)

    Thanx... it makes sense.

    This has been a niffty and useful find for me today... <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> to you and Woody's!
    Regards,
    Rudi

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,613
    Thanks
    3
    Thanked 58 Times in 58 Posts

    Re: Locked Form but able to Filter (2003/(11.6355.6360) SP1)

    One other advantage not often documented, is that snapshot queries generally run somewhat quicker than ones which allow editing.
    Wendell

  7. #7
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Locked Form but able to Filter (2003/(11.6355.6360) SP1)

    Thx Wendell,
    Always useful to pick up these tips!... <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Regards,
    Rudi

Posting Permissions

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