bouble click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danon
    New Member
    • Jul 2008
    • 20

    bouble click

    Hi to all can any one please help.
    i am trying to create a form with a list box and different names in that listbox so the user can double click on a name and would take him to anather form can any help please many thaks
  • mandanarchi
    New Member
    • Sep 2008
    • 90

    #2
    In the properties of the control, scroll down to find "Double Click".
    Click on the [...] to the right of that and select Code.

    It will take you to the module. Enter the following, replacing formname with the form you want to take them to.

    Code:
    DoCmd.OpenForm "formname",
    I'm assuming you'll want there to be a condition based on the name that is displayed in the list box. To acheive this add the following.

    Code:
    DoCmd.OpenForm "formname", , , "[yourfield] = Forms![yourform].yourcontrol"
    formname = the form you want to open
    yourfield = the field you want to base the criteria on
    yourform = the form with the list box on
    yourcontrol = the name of the listbox

    Comment

    Working...