Required fields in a form

DOF2001

Active Member
Joined
Jan 28, 2005
Messages
310
Hi, I have a DB that has a user form that need to be filled by users. The form is based on old data.
I am trying to make some fields on the form required, I try to make it required on the table used to create the form but since there are records that are missing the info that I now required, every time I accessed old records it does not allow me to get out because there is missing info on the required fields. So that solution it did not work for me, I was thinking if there is some kind of a macro that will check for required fields before the form is saved.

Any help is welcome...
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
How about using an Update Query to first update all your old records that are missing information? Then, you could change the Required property on the table without any problems.
 

DOF2001

Active Member
Joined
Jan 28, 2005
Messages
310
I can because i don't know all the missing info, the user will need to get in an update those fileds, also there are some old projects that we don't have the info.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
Could you replace them with some sort of default, or maybe just a single space? Then it will meet the qualifications of a required fields (have an entry), but still appear to be blank.
 

DOF2001

Active Member
Joined
Jan 28, 2005
Messages
310
I can do that because i need to prompt the user to entered, meaning if a user access the old record i need him to enter the missing info. So i can nor prepolute the field because when th etrecord is accesse it won't prompt the user to filled in.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
I can do that because i need to prompt the user to entered, meaning if a user access the old record i need him to enter the missing info.
I am guessing you meant to say that you cannot do that...

Take a look at this post here, I think Bob's code does what you want, requiring the field to be entered on the Form when the field is not set to required in the underlying query:
http://www.mrexcel.com/forum/showthread.php?t=353792
 

Watch MrExcel Video

Forum statistics

Threads
1,127,318
Messages
5,623,974
Members
416,002
Latest member
Neshx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top