Results 1 to 5 of 5
  1. #1
    xalaros is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2015
    Posts
    6

    HT set value to a combobox itemfrom a previous form

    hello,

    I am having two forms Customer details and Case details.

    on the Customer details form I am having a button called New case, on click runs this code
    Code:
    DoCmd.OpenForm "Case Details", , , , , , [Customer name]
    The case Details has the following macro :

    Let me tell you that I am not very profficient in access thats why I am providing all the info. Also the file was an access template that I adjust it a bit to fit my needs.



    The set value item Is a combobox which shows the customer name and there is my problem. I cannot make it take the value I am trying to pass through. althought when I change the field to a text box the customer name is shown perfectly.
    Is this normal? could I be able to make it work or should I seek a different workaround?

  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
    It appears you're trying to put the name into a combo where the bound column is the ID field. Try passing the ID instead of the name.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    I thought you couldnt use Tempvars without implicitly adding the new key to the dictionary first.
    nvm, access 2016. man am I Jealous. One Day I will get there.
    Last edited by Perceptus; 11-23-2015 at 11:30 AM. Reason: I had no idea access 2016 was so versatile

  4. #4
    xalaros is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2015
    Posts
    6
    @pbaldy thanks a lot.

    I change it and now it shows up great. thank you for your time

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and welcome to the site by the way!
    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: 05-13-2015, 01:14 PM
  2. Replies: 1
    Last Post: 01-16-2015, 09:28 AM
  3. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 1
    Last Post: 02-10-2007, 10:21 AM

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