In Base, I need to prevent new records in a form from being saved (or records from being updated) with a certain field being null. I could put a NOT NULL constraint on that field, but that would require changing a lot of old records, which I need to avoid for the sake of historical integrity. I think I need to use a macro assigned to the “Before submitting” event of the form, and I know it needs to contain an if statement about that field’s control.selectedValue being empty or null, but I haven’t the foggiest clue what commands to use to prevent the submission.
Edit: I just came across the information that returning false will prevent submission. But I’ve never dealt with returning values from sub’s before. How is that done?