Topic: Problem with saving form entry.

I have made a Table_1 and Form_1 for patient registration. Form_1 has some unique fields, that have to be manually entered and few drop down fields like Salutation, City, Last Name etc. I have created a second form (Form_2) for all these dropdown fields. The entries in this second form is saved in a separate table (Table_2) which is marked as dictionary.So for a particular ID in this dictionary there are entries in a number of columns like Salutation, Last Names, City etc.Now when Form_1 is filled up and saved, the drop-down fields are not saved as selected from drop-down list. For example, if a particular Last Name is selected, then all fields in that ID in Table_2 is selected, when the Form_1 is saved. I want to select from different fields with different IDs in Table_2. How to achieve this? I do not want to create multiple dictionaries with one field only    (for each column in Table_2).

Re: Problem with saving form entry.

Please see the screenshots of the forms and related tables, and suggest corrective steps.

Post's attachments

Attachment icon Forms_Tables.zip 179.39 kb, 42 downloads since 2019-04-20 

Re: Problem with saving form entry.

Hello Eyeman,
The way you are trying to use a single data dictionary table for multiple attributes on the same row is incorrect and will give you additional problems - for example, your tablegrids will display key values rather than descriptions, your comboboxes will display with empty rows etc.
I do not understand your objection to using multiple data dictionary tables with just one field - that is the whole point of using data dictionaries.  Multiple data dictionary tables can still be maintained on just one form using editable tablegrids (as suggested in an earlier response).
You are holding fields like 'last name' and 'middle name' as data dictionary items when they would normally be part of 'table_1'.
You shouldn't hold a field like 'age' - this is redundant.  It should be a calculated field based on the date_of_birth (again, as suggested in an earlier response).
Derek.

4 (edited by eyeman303 2019-04-20 13:47:13)

Re: Problem with saving form entry.

Hello Derek!
Thank you so much for identifying my mistakes and suggesting corrections. The number of dictionaries will increase, so will the number of Forms to input data in the dictionaries. This was what I thought, I could avoid. But now I understand that the database work in a different way. I shall follow your advice and make the necessary changes.

Re: Problem with saving form entry.

Hi,
Attached is a small example (5 data dictionaries, all maintained on one form).
There is also a calculated field for 'age' ('cfage' in the data structure) which might be of interest.
Derek.

Post's attachments

Attachment icon eyeman dictionaries.zip 341.51 kb, 61 downloads since 2019-04-20 

Re: Problem with saving form entry.

Hello Derek,
Thank you once again. I was just making the new dictionaries and thinking how to calculate age from DOB. Your program has provided the desired solution! I'm so happy! Now my program has 10 main tables and a whopping 71 dictionaries. Searching for a table in the Database tab of the MVD program will be a little difficult, though I have named the dictionaries serially. I shall follow your example and create 2-3 Summary Forms for dictionaries.

Re: Problem with saving form entry.

Hi,
71 dictionary tables seems a lot, but maybe that's just the nature of your application.
Just a thought but if you want to further reduce the number of forms, rather than creating 2-3 summary forms, you could try putting ALL your dictionaries on one form, use a page control and then sub-divide them logically onto discrete tab sheets (see attached). 
But make sure you back up your project frequently - I have a habit of accidentally deleting page controls (my bad!).
Derek.

Post's attachments

Attachment icon eyeman tabsheets.zip 337.91 kb, 60 downloads since 2019-04-21