+ Reply to Thread
Results 1 to 4 of 4

Thread: Auto Populate

  1. #1
    Registered User
    Join Date
    05-24-2010
    Location
    Rockville, MD
    MS-Off Ver
    Excel 2007
    Posts
    47

    Auto Populate

    Hello,

    I have two tables 1) tbl_Master and 2) tbl_Issue_Codes - this table has two fields: Issue_code and Issue_type.

    I want to create a form from the Master table where I select the Issue Code it will auto populate the Issue type using the reference in "Issue_Code" table. Please help! Thanks!


    LH
    Last edited by Dhoang25; 06-22-2011 at 02:50 PM.

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,621

    Re: Auto Populate

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Registered User
    Join Date
    05-24-2010
    Location
    Rockville, MD
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Auto Populate

    =DLookUp("[Issue_type]","tbl - Issue_Codes","[Issue_ID]=" & [Form]![tbl - Master Table]![Issue_ID])

    This is the code that I used but it gave me an error stating "#Name?"...Not sure what this means!

  4. #4
    Forum Guru davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2007
    Posts
    1,879

    Re: Auto Populate

    That usually means it can't find the table or field. Since your table name has spaces, wouldn't it need to be surrounded by square brackets?

    =DLookUp("[Issue_type]","[tbl - Issue_Codes]","[Issue_ID]=" & [Form]![tbl - Master Table]![Issue_ID])
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0