Alpha Video Training
Results 1 to 4 of 4

Thread: record count - delete button adjusting count

  1. #1
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default record count - delete button adjusting count

    Attached is a small zip with a couple of problems.
    The zip contains one table, one form and very little else. It will probably take
    anyone who wants to help about 30 to 45 minutes to review all the buttons and
    properties required to understand and research the problems. Hopefully, this will
    not be too much of a burden.

    I need to have several tables limited in the number of records allowed.
    As you can see from the zip, entering data is not a problem. Each time a new
    record is entered, the counter containing the record count is correctly adjusted.
    The adjustment is made via : topparent.records_get()
    Autoexec sets the table record limit and checks for the number of records.
    As records are entered, 'records_get' adjusts the variable to the current count.
    When the max is reached, no further entry is allowed and a warning box is displayed. This works OK
    Making changes to any record also works just fine. Change and Save is OK.
    However, when you start deleting records, the variable containing the record count is not
    updated even tho there is a step in the script to do just that. The number of
    records seems to lag behind by one ---- UNLESS or UNTIL you do a quick sort
    or a fetch_first. Then all is OK.

    I think that the basic problem has to do with the sequence of events that happen
    in A5 itself as the record is being deleted. And that brings up the second problem
    that seems to appear with the delete button. If you put a sort or a fetch_first
    in the same script with a delete function, A5 will delete the first record in the table
    and not the 'selected' record. Regardless of the fact that the sort or fetch is after the delete command.

    Any help will be appreciated... Where to look is good too....
    D

  2. #2
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default

    If anyone is interested in the solution, let me know!
    D

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default

    Richard, yes, please. Post your findings so others will be able to benefit from your work.

    -- tom

  4. #4
    "Certified" Alphaholic
    Real Name
    Richard Coleman
    Join Date
    Oct 2000
    Location
    Franklin, TN
    Posts
    1,206

    Default

    Will post solution ASAP, probably after holidays
    D

Similar Threads

  1. Queryrun retuns 0 record count
    By Ohlen Cartmell in forum Alpha Five Version 5
    Replies: 0
    Last Post: 07-25-2005, 05:02 AM
  2. Why is there a wrong record count?
    By michaelklein in forum Alpha Five Version 5
    Replies: 15
    Last Post: 08-05-2004, 06:50 AM
  3. Record count in filtered form
    By crimmelcp in forum Alpha Five Version 5
    Replies: 3
    Last Post: 03-22-2004, 07:39 AM
  4. query and count record
    By ken tjia in forum Alpha Five Version 4
    Replies: 0
    Last Post: 01-22-2004, 09:24 AM
  5. Getting a record count
    By Steve Sawyer in forum Alpha Five Version 5
    Replies: 7
    Last Post: 07-23-2003, 12:08 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
  •