Need help to associate form with specific field entry

J

Jackie

I have a field in my DB called 'Business Area' and there are five different
Business Area's in my organisation. I already have a macro assigned to a
button which brings up a general organisation chart, however I would like to
have another macro that brings up a more detailed org chart, specific to the
Business Area I input in the field.

EG: If I input 'HR' in the Business Area field, I need the HR org chart to
display when I click the button.

I suppose I could have five buttons each leading to a chart and let the user
pick which button to click, but it would be more user friendly if it could be
done with one button only.

I hope this is possible and that there is someone reading this who knows how
to do it!

I'm using Access 97 - Thanks in advance.

Jackie
 
E

Eric Blitzer

I assume the org charts are forms.
Behind the button
If combobox = "HR" then
DoCmd.OpenForm "HR Org chart"
else
If combobox = "engineering" then
DoCmd.OpenForm "eng Org chart"
else
If combobox = "finance" then
DoCmd.OpenForm "fin Org chart"

end if
end if
end if
 

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