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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FORM/SUBFORM EXIT SUB IF 0, HELP

Status
Not open for further replies.

storyboy

Programmer
Sep 16, 2004
25
US
Is there a way to exit a subform based on a field control in the subform, such as, If the QTY is 0. I want to not save that entry of detail, and continue filling out the fields on main form. This is an invoice data entry situation that I am working on. I really like Access, but being new at it, I need help. Thank you in advance for your good help.
Tom
 
Not quite sure I understand, but if you don't want people entering information of QTY = 0, you can put that kind of validation on the QTY control and prohibit users from entering 0 at all.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You can refer to a subform like this:
Dim Frm As Form
Set Frm = Forms!YrMain!YrSub.Form
If Frm!Qty=0 then .....

Hope this will help you

Herman

They say that crime doesn't pay... does that mean my job is a crime?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top