Results 1 to 9 of 9
  1. #1
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107

    Exporting to Excel and getting number rather than word


    I have records with a city associated with it. I had created a city table and put all the cities I plan to have available in that table and then in my form made the control a combo box. I connected the city table with my test table in a relationship. After entering several records with different cities I exported the table to excel. I got number in the city box rather than the name of the city. How do I get it to export the name rather than the number?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Have you set lookups with alias in the test table? I NEVER do this because I want to see the actual value in field, not the alias. The alias will not export from table, the actual value will.

    Export a query that joins both tables so all related data is available.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Quote Originally Posted by June7 View Post
    Have you set lookups with alias in the test table? I NEVER do this because I want to see the actual value in field, not the alias. The alias will not export from table, the actual value will.

    Export a query that joins both tables so all related data is available.
    The combo box control bites me in the butt every time I try to use it. I'm sure I'm not setting it up right but I'm beginning to think I'll just make the user enter it into a texbox. Screw it.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Recommend you not give up on combobox. They are invaluable as a data entry tool.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Quote Originally Posted by June7 View Post
    Recommend you not give up on combobox. They are invaluable as a data entry tool.
    I agree with you totally... But if I can't get them to populated the field properly and then export or report that information correctly then they truly are worthless at that point.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    The field is populated properly.

    You need to export a query that joins the tables. Or a report with RecordSource that joins tables.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    mindea is offline Novice
    Windows 8 Access 2013
    Join Date
    Sep 2015
    Posts
    11
    Sounds to me like your Cities lookup table has two fields: an ID (autonumber) field and a city field. If you created your combo box using the combo box wizard, it asked you which value you wanted to store in your form and you must have selected the ID field. If you want to store the City name, you should change the Bound Column of the Combo box from 1 to 2.
    For example if the Record Source of the combo box reads like this: SELECT [tblCities].[ID], [tblCities].[City] FROM [tblCities]; make sure the Bound Column is set to 2.

  8. #8
    Collins is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    107
    Quote Originally Posted by mindea View Post
    Sounds to me like your Cities lookup table has two fields: an ID (autonumber) field and a city field. If you created your combo box using the combo box wizard, it asked you which value you wanted to store in your form and you must have selected the ID field. If you want to store the City name, you should change the Bound Column of the Combo box from 1 to 2.
    For example if the Record Source of the combo box reads like this: SELECT [tblCities].[ID], [tblCities].[City] FROM [tblCities]; make sure the Bound Column is set to 2.
    That fixed it. Thanks a ton guys!!!!

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    If you are going to save the city name instead of ID then the ID field is useless and not even needed in the combobox RowSource. And then ID should not be designated as primary key.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Exporting Report into MS Word??
    By swicklund in forum Access
    Replies: 3
    Last Post: 04-10-2014, 10:22 AM
  2. Replies: 8
    Last Post: 04-14-2013, 01:33 PM
  3. Exporting/Linking to PowerPoint and Word
    By RachelBedi in forum Programming
    Replies: 3
    Last Post: 12-01-2012, 02:39 PM
  4. Exporting Images to Word
    By GCS in forum Import/Export Data
    Replies: 3
    Last Post: 02-16-2012, 12:22 AM
  5. Exporting Report to a word file or PDF or whatever
    By AccessDatabaseGuy in forum Access
    Replies: 1
    Last Post: 05-03-2011, 02:03 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