Jx2C,
You can get around this problem by forcing the form to try to save the record before closing. In other words, put a RunCommand/SaveRecord action in your macro in advance of the Close action.
Rather than setting the Required property of the field to Yes, you can set its Validation Rule property to: Is Not Null The advantage of doing this is that you can use the Validation Text property to have a more user-friendly message, in the place of the Access-generated message that you get when a required field is not completed.
-- Steve Schapel, Microsoft Access MVP
Jx2C wrote:
[Quoted Text] > Hello, > > I'm a relative novice when it comes to access, so I appreciate any help you > can provide. > > I've set up a number of forms each linked to an individual table of course. > These tables have a number of fields were a value is required. I've also > placed a command button at the end of each form that runs a macro. The macro > opens the next form in line and closes the form that was just finished. > > Here is my problem: if the data entry person leaves a required field blank, > the button/macro closes the form without displaying an error message and > giving them the chance to fill in the missing field. The macro just forces > the form closed and doesn't save ANY of the entered information in the table, > presumably because there are empty "required" fields. > > Please help! Does anyone know how I can set the macro to allow for the > correction of skipped required fields? Is there a better way to link > subsequent forms? > > Thanks for your help! > > Jx2C
|