Alpha Video Training
Results 1 to 5 of 5

Thread: How to protect end user edit data in the past

  1. #1
    Member
    Real Name
    Peterth
    Join Date
    Oct 2009
    Posts
    278

    Default How to protect end user edit data in the past

    Hi all,

    May I have idea how to protect end user edit data he'd already keyed in the past. like the amount of money that customer paid ; Amount_paid field of rec_paid table. I provide this field to him he can key in the amount of money but I don't want he edit or modify this value later after he press confirm button.

    (if this button is pressed,
    then Amount_paid field of rec_paid table cannot modify )

    the problem is I don't know command to select and specific button name, and
    also the command to diable amount_paid field, after the button is pressed.

    Thanks
    Peter-th

  2. #2
    Member
    Real Name
    don walters
    Join Date
    Mar 2002
    Location
    North Carolina
    Posts
    113

    Default Re: How to protect end user edit data in the past

    One simple suggestion that I have used in the past is to Duplicate the layout form "Paid" to "Paid1". Then change only the button properties to "disable" or remove the button completely from that form. Use the new "Paid1" form only for lookup of the customer. Modify your call to the forms to filter for "new" vs "lookup" to get the correct form.

  3. #3
    Member
    Real Name
    Peterth
    Join Date
    Oct 2009
    Posts
    278

    Default Re: How to protect end user edit data in the past

    Don,

    My purpose is like this
    If I have form for user to key in data everyday and he can key in the data many records per day. I allow him can edit or modify data only within today and cannot modify all data records in the past. or after he press the button to confirm the data he key in during the day and then he cannot modify the data later.
    He can edit/modify data but if he press confirm the data, then he cannot modify all data anymore.

    Thanks
    Peter-th

  4. #4
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default Re: How to protect end user edit data in the past

    Put a field in your table called something like allowchg
    make it a logical field type.
    allowchg L 1

    When you open the form check the allowchg field.
    If the allowchg field is true then set allow edits property of the form to be true
    If the allowchg field is false the set the allow edits property of the form to false.

    When the user clicks on the confirm button,
    t=table.current()
    t.change_begin()
    t.allowchg=.f.
    t.change_end()

  5. #5
    Member
    Real Name
    Peterth
    Join Date
    Oct 2009
    Posts
    278

    Default Re: How to protect end user edit data in the past

    Charlie,

    Thank you for your idea. I will try it.
    However does it work for all fields on form or each field?

    Thanks
    Peter-th

Similar Threads

  1. don't allow to edit the data in the past
    By peterth in forum Alpha Five Version 10 - Desktop Applications
    Replies: 9
    Last Post: 03-13-2010, 11:24 AM
  2. Read Past End Of File
    By reynolditpi in forum Alpha Five Version 8
    Replies: 12
    Last Post: 01-08-2008, 11:57 PM
  3. read past end of file?
    By Jeff Moses in forum Alpha Five Version 4
    Replies: 1
    Last Post: 12-09-2000, 06:47 AM
  4. read past end of file
    By martinwcole in forum Alpha Five Version 4
    Replies: 3
    Last Post: 10-14-2000, 05:55 AM
  5. Read past end of file
    By forskare in forum Alpha Five Version 4
    Replies: 5
    Last Post: 04-09-2000, 05:39 AM

Bookmarks

Posting Permissions

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