Hide a subform

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
 
G

Guest

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 & ";"
 
M

Michael Hanlon

DoCmd.OpenForm "frmemp", acNormal
how do you set this up
I am very new to this database thing.

mike
thanks
 

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