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
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
Comment