Results 1 to 6 of 6
  1. #1
    cabonegro is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    7

    Access 2003 - a link that opens what's on a drop down menu

    Hi everyone,

    I have a form that has a drop down list which has names of lawyers these name are stored in a table called "Lawyers". I created a link in case a user needs to open the form that has all information about lawyers however when the form opens up it open with the first name in the list and not what it was chosen in the drop down list.



    So what I'm trying to do here is when a user clicks on the LINK the lawyers form open with the info about the lawyer chosen in the drop down menu!!

    Please let me know if you have any questions!

    Thanks in advance

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    cabonegro is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    7
    Thanks for the reply, I'm new to programing so please be patient

    I tried applying the code you refered on your reply but it didn't work!
    Here is what I have:
    Form1 has a drop down list named "Lawyer name"
    Form2 that I want to open straight from a link in Form1 has a field called "First&LastName"

    I created a field named "open" and I added the following code:

    DoCmd.OpenForm "Form2", , , "Lawyer name = '" & Me.open & "'"

    Do you have any idea on what I'm doing wrong?

    Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Due to the inadvisable space in your name, it needs to be bracketed:

    DoCmd.OpenForm "Form2", , , "[Lawyer name] = '" & Me.open & "'"

    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    cabonegro is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    7
    I tried it again and still no luck!

    - the link I created to open a form was by adding a command button named OPEN and specifying that it should open form2 than I added the code to it.

    Is this the right way of doing it?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Probably; what's the complete code for the button now? Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-10-2009, 03:03 PM
  2. Shortcut that ONLY opens Access Form
    By uneek78 in forum Forms
    Replies: 0
    Last Post: 03-30-2009, 06:52 AM
  3. Access opens Frontpage
    By windsurfer in forum Access
    Replies: 0
    Last Post: 02-10-2008, 03:53 PM
  4. Drop Down, link to another dropdown
    By davelliott in forum Forms
    Replies: 3
    Last Post: 05-23-2006, 08:05 PM
  5. How about creating a drop down menu in a report?
    By beastmaster in forum Access
    Replies: 2
    Last Post: 12-29-2005, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums