Topic: Compulsory field
How to make data entry in a particular text field compulsory ( eg: Mobile_No. or DOB.), before the form can be saved?
My Visual Database → General → Compulsory field
How to make data entry in a particular text field compulsory ( eg: Mobile_No. or DOB.), before the form can be saved?
Hi,
Can you not just define any relevant fields as mandatory in your data structure - or are you meaning something else?
Derek.
.
Thank you, Derek and Sibprogsistem.
My database now already has data and setting a field to not null will require specifying a default value for the field. Then even if no data is entered in that field, the form will be saved with the default value. But I need real data for the field. Deleting the present database and recreating it will involve a lot of work. Any simpler solution to prevent saving the form without data in a field, in an existing database?
Regards,
eyeman
.
Hi Eyeman Hi Sibprogsistem,
Another option, rather than delete the current database, is:
0. Copy your entire project folder (just as a back-up- but I've never had a problem)
1. Go to the relevant project folder
2. Find and rename sqlite.db to xxxxx.db
3. Go to your database schema in MVD
4. Change any fields to mandatory - no 'default' value is required. Don't save or run your project yet.
5. In the project folder, rename xxxxx.db back to sqlite.db
6. Finally save/run your project.
Derek.
I could change the attribute of the field to "Not Null" by following the above steps. However, since there is a PageControl in the form the error message does not appear directly over the required field. Adding the suggested script positions the error message above the required field. So in a working database, a field may be made mandatory in both the ways, depending on the form controls. Now I get the desired result on clicking the Save button.
Thanks again, Derek and Sibprogsistem.
Regards,
Eyeman
My Visual Database → General → Compulsory field
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi