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

If Then different form

Status
Not open for further replies.

troix

Technical User
Jan 20, 2004
46
0
0
US
in VB, i need to create an If..Then statement

On the form "PAGE7" is a field "Med55"
on the form "PAGE8" is a field called "Med76"

If Med55 is "1" then Med76 needs to be disabled.

Being Med76 is on a different form, how would I writ the statement?
 
Try this:

If Med55 = "1" then forms![page8]!Med76.enabled=false.

My syntax might be a little screwed up but that's it.
 
Doesn't work. already tried that 1,000 times.
 
Doesn't work
Any error message ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
And, to prevent us trying out the same things you've tried, consider posting what you've tried - i e current code, different attempts - and a also from where (which form/subform) you're attempting to do this, and which event (see one of the faq's in PHV's signature on how to get the best answers...).

Meanwhile take a look at How to refer to a control on a subform or subreport in Access 2000 which should hold the answers to this question.

Roy-Vidar
 
Is page8 Open? Here's some code I have used.

DoCmd.OpenForm "Add Dependents"
Forms![add dependents]!txtHiddenCategory = 3
Forms![add dependents]!cmbRelCde = "ch"
Forms![add dependents]!lblInstr.Caption = "Enter new dependent's Information
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top