Results 1 to 11 of 11
  1. #1
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115

    double click to a record and open a new form

    Hi I am having a report that collects data and shows them smth like Open orders and the vendor
    Order nr


    order date
    vendor
    vendor telephone
    What I want is that by double clicking on a vendor it opens a new form where are shown the orders owned only by that certain vendor clicked.
    Is that possible at all?

    Thanks for any tips

  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,515
    This should work for you:

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

  3. #3
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115
    I tried it and is givimg to me an Data type mismatch in critera expression?!

  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,515
    What exactly did you try, and what is the data type of the relevant field?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115
    Data is simple
    material number in plain text. should not be an issue I guess.

  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,515
    Without seeing your code, I could only guess at the problem. Did you use the format appropriate for text?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115
    So basically the form control source is called Material, text format : plain text. and in the new opened form is the same control source called material also in plain format text. can it be that both control sources have the same name? I think not.

  8. #8
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115
    This is the code I did put in click event
    DoCmd.OpenForm "FRM2", , , "[PO] = " & Me.PO

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,515
    As noted in the link, the syntax is different for a text value:

    DoCmd.OpenForm "SecondFormName", , , "FieldName = '" & Me.ControlName & "'"

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

  10. #10
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115
    You were right..how did I missed that !!
    Working perfectly.

    Thanks for the answer :-)

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,515
    Happy to help!
    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. Tables/Queries/Etc Won't Open on Double Click
    By William McKinley in forum Access
    Replies: 3
    Last Post: 07-27-2011, 07:45 AM
  2. How to Restrict the Listbox on double click
    By ganeshvenkatram in forum Access
    Replies: 2
    Last Post: 07-07-2011, 10:05 PM
  3. On Double Click go to Subform
    By Theremin_Ohio in forum Access
    Replies: 2
    Last Post: 03-30-2011, 08:03 AM
  4. Double click combo box to add data
    By sam49 in forum Database Design
    Replies: 29
    Last Post: 03-28-2011, 08:58 AM
  5. Opening another form by double click
    By chrisjack001 in forum Access
    Replies: 1
    Last Post: 10-13-2010, 02:19 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