Hide a subform

  • Thread starter Thread starter Michael Hanlon
  • Start date Start date
M

Michael Hanlon

I have a form that has some subforms on it and I would like to hide the Pers
info form from everyone expect pers in one department I can open the main
form in code like

DoCmd.OpenForm "frmemp", acNormal

but how do I hide the subform frmpersinfo

second question

On this same form frmemp I have a combbox named department and I will like
to open the form in code only to show the pers in there department only like
in account.


any help is great and thanks in advance.

mike
 
Hide Subform

Forms!MainFormsName!SubFormsName.visible = false
same idea if you wanted to set focus to a sub form
Forms!frmdatainput!subIPS.SetFocus (not that you asked
for tha bit of info)

ComboBox list

You can change the comboboxes SQL source code
something like

cbxNamesOfPeopleAtCompany.RowSource = "SELECT
EmpolyeeNames FROM CompanyProfile WHERE CompanyName = " &
CompanyVariable & ";"
 
DoCmd.OpenForm "frmemp", acNormal
how do you set this up
I am very new to this database thing.

mike
thanks
 
Back
Top