Help with right VBA code syntax

G

Guest

Hi,

I'm very new to VBA and am struggling with a bit of code than I wonder if
someone nice could help out with!

Basically I want to write code that says if one of the entries (lets call it
Entry10)in the combo box on FormA is selected then FormB will open.

I presume I can use the code builder for the AfterUpdate event property for
the combo box on formA, but here's where I start to go off the rails. How do
I write the OpenForm command so it will only operate if "Entry10" is selected
in the combo box

Thanks for any assistance
Joe
 
G

Guest

In the after update event of the conbo box use the following but this looks
too simple. Is entry 10 a fixed item that you know or are you saying it could
be variable
and you need to check if it is the 10th item in the list ?

if combobox = "Entry10" then
DoCmd.OpenForm "FormB"
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