Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to require fields to be filled w/o required property

Status
Not open for further replies.

MaDmiX

Technical User
Dec 10, 2002
19
US
Hi,

Thanks for all the help I've been getting from the forum. I have a question about required fields and subforms. I created a form that contains a number of required fields, and a subform within it. The tab order is set so that the subform is reached before all of the required fields on the main form are filled in. The problem is that when I tab to the subform, I get the error asking me to complete the required fields on my main form.

Now, I also have a control button on the form that runs a report. Is there a way that I could verify all fields were completed at the point that this control button is pressed (like through a macro or at the query, somehow)... or some other way around this dilema? It is not possible to have the user fill out all the fields on the main form before entering the subform, yet all the fields have to be filled before the record can be saved. All suggestions are welcome.

Thanks,

Ken

 
Sounds like a good canidate for (a thorough) design review.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Seems you have a button and that means that you have a click event. It is a simple thing to place some code in the click event to check and ensure that all of your required fields have values. If not then do not do the normal processing for the click event.
 
Hi Allanon,

Thanks for your suggestion. I was able to use the "Tag" property to flag the "required" fields, which I then checked via a class module. When the user clicks on the "print report" button there is an If... Then statement that runs the class module and returns a prompt if any of the required fields are null.

Thanks again,

Ken

Where there's a will, there is a way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top