On click events

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a db and one of my fields is a drop down field that contains 12 different options. Each of those options require more information which I have created forms for. What I would like to do is that when a selection is clicked on from the list, that subsequent form would open in another window or control on that main form. How difficult is this?
 
Assuming that your drop-down field is either a combo or a
list box, you can put code along the following lines in its
AfterUpdate event handler

Dim strFormName as String

Select Case combo/list.Value
Case "First Option"
strFormName = "1stForm"
Case "Second Option"
strFormName = "2ndForm"
etc
End Select

DoCmd.OpenForm strFormName

You will have to replace combo/list with the name of your
control as well as the values in your drop down list and
the form names.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I am creating a db and one of my fields is a drop down
field that contains 12 different options. Each of those
options require more information which I have created forms
for. What I would like to do is that when a selection is
clicked on from the list, that subsequent form would open
in another window or control on that main form. How
difficult is this?
 
Back
Top