Subject Re: Wizard generated form - data input
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Wed, 10 Apr 2019 11:26:09 +0530
Newsgroups dbase.getting-started

On 10/04/2019 02:18, Kent wrote:
> I have a table (Medical_data), and two forms. medical_browse and medical_edit. All fields are data linked.
>
> The medical browse form opens with a query that sorts the rows in year, month and day order. It is working perfectly.
>
> The problem is the edit form. I need the rows sorted in order to find rows I need to edit. I guess that by design, somebody cannot change data in a query form. Since I need to find and edit, I have tried to unlock the form with, using various tools such as Edit, unlock, the data edit button ect. The form just ignores them or generates errors.
>
> The form always generates "rowset is read only".
>
> How can I unlock the edit query generated form, and still have it sorted?
>
> Any help would be appreciated.

Check the requestlive property it should be true.
Second most important when we use "order by" in sql at times it makes
the query readonly when there are multiple columns involved.

I can suggest two alternatives and I am afraid none of them is coding
friendly.
Option one
Add another rowset of the same table but this time without any order by
clause. In search and navigation retain the old rowset but in
datalinking change to new rowset.
Use the onNavigate event of the first rowset to navigate the new rowset
as desired to the same row.
This option requires less but fine tuned coding.

Option Two
Remove the datalinking. Use the onNavigate event to populate the fields
and then sql to save the rows. A lot of work is required as each field
value has to be checked for modifications before allowing to move to
next row.
Since no datalinking is there hence autosave etc are all disabled.

There may be easier alternatives also but I am unable to recall any.
And if there is no primary key column in your table then it will be hell.

Regards
Akshat