A
Amir
Hi,
I'm using an ADP project with SQL Server 7 back-end.
In the ADP I have a continuous form in which near each record there is a
'hide' button which does the following:
1. Runs a stored procedure to update the 'IS_SHOWN' culomn of the current
record to 0 value (It doesn't change values in records other than the
current record).
2. Requries the form.
This causes the current record to 'disappear' from the form, since the form
record source of the form (It's a SELECT statement in a stored procedure)
has a condition of (IS_SHOWN = 1) in it's WHERE clause.
This works fine.
What I wish to do is that after the requery action, the focus will be set to
one record above the 'disappeared' record, instead of setting the focus to
the first record in the form, like it does today due to the requery command.
This should take in care (in order to prevent error messages) that sometimes
the form will remain with no records, in cases where the 'disappeared'
record was the only record shown when the user clicked the 'disappear
record'.
How can I do that part of setting the focus to the 'previous record' (if
exists) after the requery?
Regards,
Amir.
I'm using an ADP project with SQL Server 7 back-end.
In the ADP I have a continuous form in which near each record there is a
'hide' button which does the following:
1. Runs a stored procedure to update the 'IS_SHOWN' culomn of the current
record to 0 value (It doesn't change values in records other than the
current record).
2. Requries the form.
This causes the current record to 'disappear' from the form, since the form
record source of the form (It's a SELECT statement in a stored procedure)
has a condition of (IS_SHOWN = 1) in it's WHERE clause.
This works fine.
What I wish to do is that after the requery action, the focus will be set to
one record above the 'disappeared' record, instead of setting the focus to
the first record in the form, like it does today due to the requery command.
This should take in care (in order to prevent error messages) that sometimes
the form will remain with no records, in cases where the 'disappeared'
record was the only record shown when the user clicked the 'disappear
record'.
How can I do that part of setting the focus to the 'previous record' (if
exists) after the requery?
Regards,
Amir.