Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Cool Unanswered: Problem Locking a Form

    I am trying to create a Form for Data Entry. The Form should come up in a view only mode that way the user won't accidentaly change any data in the record. I have an Edit and Add command button that unlocks the form and then allows data entry--

    This setup works well except I have a few fields on the form - Mostly COMBO boxes with QUERY to select the records-- that are NOT LOCKED when the form is in VIEW mode...

    HOW CAN I FIX THIS?? I don't want to change the property so that it is ALWAYS locked, ONLY LOCKED when it is in VIEW MODE..

    PLEASE HELP!!!

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    If your "View Mode" is a toggle for the Form's "Allow Edit" property then that might work for you ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Nov 2003
    Posts
    300
    Actually in the Form's Property I do have "allow Edits" as a YES--

    I will elaborate-- the following is the Code in the form:

    Me![Tax].Locked = OnOff
    Me![TaxId].Locked = OnOff
    ' Me![Market_ID].Locked = OnOff
    Me![Combo226].Locked = OnOff
    Me![Combo238].Locked = OnOff

    When the code is executed, it gives me an error on the Line - Me![Market_ID].Locked = OnOff.... so that is why it is commented out... However, that is also the problem now, when the form is OPENED, a user could go to that particular field and change it on the form without hitting the EDIT button.. I want to be able to lock the [Market_ID] field during the VIEW mode but be able to EDIT it when the user hits the edit button...

  4. #4
    Join Date
    Nov 2003
    Posts
    300
    Can anyone help on this one????

Posting Permissions

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