Embded form as subform and validation

B

balu

I have an form name mainform that is login form with cmd buttons to open
other forms
on click event of button on mainlogin form ,form2 will open
on the form 2 i have an embeded subform ,form3 which is based on a query
now i created an event
form2_beforeupdate(cancel as integer)
dim press as string
if form!form2!subform!form3.[x] >form!form2!subform!form.[y] then
press=msgbox("x can't be > y")
cancel=true
endif
endsub
kindly advise what is wrong with code and also advise how to refer
such form built on querys to refer on main form events please
balu
india
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top