Results 1 to 6 of 6
  1. #1
    Chronus13 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    24

    Auto Populate Field Not Working

    Hello,
    I have a small issue i am trying to figure out. I have a form that has a drop down list in a combo box. This allows me to select a name. I am trying to auto populate the name chosen into another box on another form. Seems to be working but I noticed i am getting the auto populate as a number instead of the Name i selected. It looks like it is auto populating the selection number. If i have 4 names and i select the third one for example, the auto populate will show "3" instead of the name. Any idea why this is happening? I am using the below:

    =[Forms}![Form1]![Combo3] as the control source, Form1 is the form with the drop down listing while Combo3 is the name of it

    thanks,
    Wes

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,536
    Try:
    =[Forms]![Form1]![Combo3].Column(1)
    Last edited by Bob Fitz; 03-31-2021 at 10:31 AM. Reason: Typo
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    Any idea why this is happening?
    That is how it's supposed to be done if the number value is related to a primary field. That is, you store the PK (which I suspect in your case is an autonumber field) in the records of the many side of a one to many relationship, not the value you see in the combo (e.g. a name).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Chronus13 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    24
    Bob,
    I appreciate it, that fixed my issue.

  5. #5
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Wes

    Maybe we should step back a bit and ask what is the purpose of the name field in the related Form?

    Are you linking the underlying tables on the name field?

    is the name field the FK of the related table?

    If this is the case then the display of the Number is correct.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,536
    Quote Originally Posted by Chronus13 View Post
    Bob,
    I appreciate it, that fixed my issue.
    I'm glad that you have a solution to your problem now but I hope that you have taken on board the point that Micron raised.
    IMHO My proposed solution is fine as a method of giving information to a user but if you are intending to store information about this person in another table then you should save the number, which is I presume, the PK, rather than the text value.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 20
    Last Post: 09-09-2020, 10:31 PM
  2. Replies: 5
    Last Post: 07-06-2018, 01:30 PM
  3. Replies: 7
    Last Post: 08-19-2016, 08:16 AM
  4. Auto populate not working in form
    By rosefield in forum Forms
    Replies: 12
    Last Post: 04-29-2014, 03:51 PM
  5. Replies: 3
    Last Post: 10-03-2011, 02:33 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