PDA

View Full Version : SubForm Visibility



sstrauss87
10-27-2011, 12:43 PM
hello,

Anyone know how I can write vb code to check if a sub form data field is empty, then adjust the visibility accordingly

orange
10-29-2011, 06:04 AM
See the info athttp://access.mvps.org/access/forms/frm0031.htm


General syntax to check a control on a subform from the main form

Me!Subform1.Form!ControlName

jrajul
11-05-2011, 09:54 PM
hello,

Anyone know how I can write vb code to check if a sub form data field is empty, then adjust the visibility accordingly


Type this into the main form's current event procedure.

subform1.Visible = True
If IsNull(subform1.Form.Controls("Control name in quotes")) = True Then subform1.Visible = False

jrajul
11-05-2011, 09:57 PM
Paste this into the main form's current event procedure


subform1.Visible = True
If IsNull(subform1.Form.Controls("Your control name in quotes")) = True Then subform1.Visible = False

jrajul
11-07-2011, 09:40 PM
.