Connect Form to database, with readonly or read/write mode set per field

Form creation wizard, Data Sources view, and Record field, can be used for viewing and editing content of database trough a custom Form. But i can’t find a way to pull certain data in read-only form, into Form which accepts input for other fields. Are queries the only way to achieve that?

It is not clear for me, what you try to achieve. A form usually has one datasource, where it reads it data from. This can be a query or a table, not another form. (As a form may show data, wich is not committed to the database I’d think this is a good idea.)
.
But the term form has double use: You can have more than one “logical form” on the “visual form” we see on the screen. So you could display data from two tables side by side. Form-Navigator shows a hierarchic view of the elements of a “visual form”.
.
You may copy and paste individual contents of fields around, but I don’t see a way to “drag” complete records between forms.
.
As usual: With macros you may achieve or emulate what you need.

Do you want to copy values form a read-only-form to a form, which will accept data?
Might be it helps to set the read-only-form as mainform and the form, which should get the data, as subform. Connect the fields you need in subform.

Might be a little example would help.

1 Like

defaults2.odb (40.4 KB)

The first form reads preset values stored in a separate table into a new record.
The second form reads values from the parent form’s currently selected record into a new record.

Ty for answers, i was able to add sub form trough the creation wizard, and though Form Properties in context menu of corresponding Control have set 1 form to read only. But the result doesn’t work correctly. After opening the form i can iterate over records and the read-only field will update, but the editable one won’t. If i change value of the editable one on some record, the read-only field becomes stuck at value from that record and total number of records starts showing incorrect values.

I’ll check out your examples once i get to isolated machine, but i would appreciate descriptions of to set up things which they are intended to show.

p.s. doing Open on a Form, and then pressing Form\Open in Design Mode doesn’t switch the mode and makes it impossible to close the window.

As Robert suggested, Please find enclosed example that accomplish his proposal. Be also so kind to select read/write or read only in form properties.
Read only SubForm.odb (11.3 KB)