Help with right VBA code syntax

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top