Results 1 to 6 of 6
  1. #1
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187

    Getting table value to appear in report, not record ID

    A few fields in my table store primary keys in other tables. I am creating a report and instead of the text value showing up, it is displaying the ID. How do I make the report retrieve the text value for that ID from the given table? I have created the appropriate relationships with all tables.



    Also, I have 2 comboboxes that store a value-list of time values (12:00AM to 11:45PM). Should I store this as a text value in my main table, or the listindex value of the combobox (the values store\retrieve correctly when saving\viewing a record)? I am having the same issue as above with these time values showing in the report, it is showing the listindex of the selected time instead of the text time value. And there is no table to display this time value, since it is a value list combobox.

  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,652
    Typically you'd base the report on a query that joined the main table with the other tables, which allows you to include the text field in the report.

    If you're just going to use a value list rather than a table for the times, I'd just store the value in the table rather than an index/key value. Also, I'd probably store it as a date/time value rather than a text value, unless it's just for display.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187
    I am basing the report off of a query, my query is retrieving the ID of the item (fieldname is EventType) (since that is what gets written to the db when a selection is made). Ie. I have a table named EventTypes which stores different types of events. A combo is populated with the ID;Type and bound to the EventType field in my Events table. In my report, it is giving me a numerical value, not the text linked to it.

    As for the time values, it is not just for display, this time value is used when I create an outlook meeting through VBA. The only catch is they want a combobox drop-down of time values to use (not free-form) from 12:00AM to 11:45PM, 15-minute increments. This is why I filled it with a value-list and record the listindex when clicked. What is the most efficient\best way to store this type of thing?

  4. #4
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187
    Ok I figured out the first issue, now I just need to figure out how to handle times

  5. #5
    BRZ-Ryan is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    187
    Ok, I changed the time field in my events table to Date\Time, and populated the comboboxes with time values. Everything is working, unless you can recommend something else\better.

  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,652
    Sounds like you've got it licked.
    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: 2
    Last Post: 09-18-2013, 09:58 AM
  2. Replies: 3
    Last Post: 03-09-2013, 10:39 AM
  3. Replies: 6
    Last Post: 08-10-2012, 09:37 AM
  4. Replies: 3
    Last Post: 08-09-2012, 01:49 PM
  5. Auto Print Report for each record in table...
    By access32 in forum Reports
    Replies: 1
    Last Post: 12-17-2010, 11:46 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