Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Lock a field only for that record- Need some help !

Discussion in 'Information Technology' started by sunilkeswani@gmail.com, Nov 1, 2005.

  1. sunilkeswani@gmail.com

    sunilkeswani@gmail.com
    Expand Collapse
    Guest

    Hi,

    I have a form which is something like this. There are 3 command
    buttons, which input Now() into their corresponding text boxes. I want
    the data to become uneditable once the command button is pressed.

    EXAMPLE

    We try 3 times before closing a pending issue. There are 3 buttons with
    text boxes
    ATTEMPT 1, ATTEMPT 2, & ATTEMPT 3

    Now, there needs to be a validation that Attmept 1 time should always
    be before attempt 2 and 3...Also, once the Attempt 1 is registered, the
    particular entry should become uneditable.

    I tried locking the field, but it remains locked even when i go to the
    next record on the form...

    Please help

    Regards
    Sunil
     
  2. Loading...

    Similar Threads Forum Date
    Debate With Sarbjeet Singh Dhunda At Turlock (California) Gurdwara, April 2015 - YouTube Gurmat Vichaar Apr 23, 2016
    Uk clocks go back Blogs Oct 17, 2015
    Kesh: Dreadlocks Questions and Answers Nov 20, 2013
    Obamacare Faces Near-Solid Block In The South Health & Nutrition Mar 31, 2013
    Malaysia Have you forsaken your flock, Archbishop? Malaysia News Update Breaking News Jan 30, 2013

  3. Al Camp

    Al Camp
    Expand Collapse
    Guest

    Sunil,
    Given that Date Attempt 1thru 3 are all Null until updated, use the Click
    event of each button with this code...
    Attempt1 = Date()
    Attemp1.Enabled = False
    Do this for each button and associated field.

    You'll also need this code for the OnCurrent Event of the form itself...
    Attemp1.Enabled = IsNull(Attempt1)
    Attemp2.Enabled = IsNull(Attempt2)
    Attemp3.Enabled = IsNull(Attempt3)
    --
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions

    <sunilkeswani@gmail.com> wrote in message
    news:1130793022.035765.99000@g49g2000cwa.googlegroups.com...
    > Hi,
    >
    > I have a form which is something like this. There are 3 command
    > buttons, which input Now() into their corresponding text boxes. I want
    > the data to become uneditable once the command button is pressed.
    >
    > EXAMPLE
    >
    > We try 3 times before closing a pending issue. There are 3 buttons with
    > text boxes
    > ATTEMPT 1, ATTEMPT 2, & ATTEMPT 3
    >
    > Now, there needs to be a validation that Attmept 1 time should always
    > be before attempt 2 and 3...Also, once the Attempt 1 is registered, the
    > particular entry should become uneditable.
    >
    > I tried locking the field, but it remains locked even when i go to the
    > next record on the form...
    >
    > Please help
    >
    > Regards
    > Sunil
    >
     
  4. sunilkeswani@gmail.com

    sunilkeswani@gmail.com
    Expand Collapse
    Guest

    Thanks. this works like I wanted, but the only problem is that the
    command button is still enabled, and when clicked again, the field
    still gets updated with the new Date ().

    Can you please advise on how i can make that field on this particular
    record uneditable?

    Regards
    Sunil
     
  5. Al Camp

    Al Camp
    Expand Collapse
    Guest

    Disable the button After clicking, and OnCurrent too.
    Attempt1 = Date()
    Attemp1.Enabled = False
    btnAttempt1.Enabled = False
    Do this for each button and associated field.

    You'll also need this code for the OnCurrent Event of the form itself...
    Attemp1.Enabled = IsNull(Attempt1)
    btnAttempt1.Enabled = IsNull(Attempt1)
    Attemp2.Enabled = IsNull(Attempt2)
    btnAttempt1.Enabled = IsNull(Attempt2)
    Attemp3.Enabled = IsNull(Attempt3)
    btnAttempt1.Enabled = IsNull(Attempt3)

    Actually, if you set Attempt1 thru Attempt3 as Disabled = False in design
    mode, then you would only have to handle Updating the fields, and Disabling
    the buttons. The fields would always be disasbled... whether Null or Not.

    --
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions


    <sunilkeswani@gmail.com> wrote in message
    news:1130795654.309964.121460@g14g2000cwa.googlegroups.com...
    > Thanks. this works like I wanted, but the only problem is that the
    > command button is still enabled, and when clicked again, the field
    > still gets updated with the new Date ().
    >
    > Can you please advise on how i can make that field on this particular
    > record uneditable?
    >
    > Regards
    > Sunil
    >
     
  6. sunilkeswani@gmail.com

    sunilkeswani@gmail.com
    Expand Collapse
    Guest

    Thanks Al. It works great!
     

Share This Page