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

Setting default of subform to null

Status
Not open for further replies.

BigBlueScreen

Technical User
Jul 23, 2004
31
US
Hi,

I have a subform "FRMPlantMachineSub"; in which I need on open to appear blank.

I tried entering:
Private Sub Form_Load()
Me.FRMPlantMachineSUB = Null
End Sub

error--"object doesn't support propert"
Any help would be GREATLY appreciated..

Thanks,
Jd
 
Not sure what context you mean blank,

but if it is for data entry then try changing the form property dataentry to yes

please clarify if not the case.

Chance,

Filmmaker, gentlemen and forum1229
 
Hi,

Thanks for the quick response..as the form is now,when opened data is already populating subform--I want it either to appear but blank or somehow set visibility to no until after update of combos.

Hope that clarifies alittle..

Jd
 
You could try

Forms!FRMPlantMachineSub.form.visible = false



Chance,

Filmmaker, gentlemen and forum1229
 
sorry that should be

me!FRMPlantMachineSub.visible = false

Chance,

Filmmaker, gentlemen and forum1229
 
Hi

Anyway I could send you a screenshot of what I would like it to resemble??

Thanks,
Jd

 
ok e-mail it to JunkusMaximus at 5ylac dot biz

Chance,

Filmmaker, gentlemen and forum1229
 
Aha! this is cheating slightly

Ok what you will need to do is reference the detail section of the sub form

something like

FRMPlantMachineSUB.Form.Section(0).DisplayWhen = 1

then on the afterupdate event on your combo change the displaywhen value back to 0

Chance,

Filmmaker, gentlemen and forum1229
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top