Alpha Video Training
Results 1 to 8 of 8

Thread: Undelete Record

  1. #1
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Undelete Record

    I'm currently usings the v5 undelete script to undelete records. I added the last 2 lines of code to show the undeleted records but it's not quite right. The browse does not refresh. (If I go to design and back to view or close the form and open, the browse is refreshed)

    Where am I misdirected?

    Thanks,

    kenn

  2. #2
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Undelete Record

    Welllllll....Remember I did say it was below 0 here tonight.

    Here's the script.

    Thanks,

    kenn

    t = table.open("Class")
    'undelete all records, and mark those that are undeleted
    '(assume that 99999999 will be more that total records in table)
    t.undelete(1,99999999,.t.)
    t=table.current()
    browse1.refresh()

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

    Default RE: Undelete Record

    Ken:
    I am just south of Boston this week.(Plymouth Mass.)
    Tempature of 9 with winds gusting to over 40
    wind chill way below zero

    if your browse is on a form
    try

    :yourformname:browse1.refresh()

    or

    parentform.resynch()

    charlie crimmel

  4. #4
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Undelete Record

    Hi Charlie,

    You're supposed to be there the 1st week in April. (:>)

    Anyhow, tried both; same result as the refresh()

    Still must close and reopen the form.

    Any other thoughts?

    Thanks,

    kenn

  5. #5
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Undelete Record

    Would the fact that the browse has a calculated field on it make any difference?

    Just wondering.

    Thanks,

    kenn

  6. #6
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,784

    Default RE: Undelete Record

    Ken,

    I have had times where resynch() or refresh() did not work, but the following did:

    sys_send_keys("{F5}")

    Let me know if this works for you.

    Gary

  7. #7
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,784

    Default RE: Undelete Record

    Ken,

    As a further thought, the F5 mentioned above often does work. If not, you may need to re-query the records and then refresh using resynch, refresh or F5. Good luck.

    Gary

  8. #8
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Undelete Record

    Gary,

    The first 2 suggestions didn't work so resorted to the re-query. Copied code fromanothere button I had and it works. I think part of the problem is the fact that i have a multi-state button on the form as if I comment out that part of the code, it doesn't work.

    In case this might help someone else, here's the code.

    kenn

    t = table.open("Class")
    'undelete all records, and mark those that are undeleted
    '(assume that 99999999 will be more that total records in table)
    t.undelete(1,99999999,.t.)
    t=table.current()

    '' Reset the query
    dim tbl as p
    tbl = table.current()
    tbl.order(searchby.text,searchby.text + " \"\"")
    browse1.refresh()
    'mulstbtn2.text = "2"
    '' Get the table object from the form
    ''
    t = topparent.Table_Get()
    ''
    '' Get the current record count
    ''
    i = t.index_primary_get()
    count = i.records_get()
    ''
    '' Force the browse to refill
    ''
    browse1.refresh()

Similar Threads

  1. Undelete record
    By Doris Davidoff in forum Alpha Five Version 5
    Replies: 5
    Last Post: 01-13-2004, 07:13 PM
  2. Undelete or Recover
    By Fletch in forum Alpha Five Version 5
    Replies: 1
    Last Post: 12-24-2003, 09:49 PM
  3. undelete record
    By Nora Peeples in forum Alpha Five Version 4
    Replies: 4
    Last Post: 12-28-2002, 11:52 AM
  4. Undelete records
    By Monty Parrish in forum Alpha Five Version 5
    Replies: 7
    Last Post: 09-17-2002, 11:29 AM
  5. Undelete Record function
    By csda1 in forum Code Archive
    Replies: 1
    Last Post: 09-19-2001, 12:01 PM

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
  •