Results 1 to 10 of 10
  1. #1
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295

    Table problem

    Good night,



    table "instructor" has a field called "InsName"
    Table "Course" has a field called "CourseName'
    Table "TimeSheet" has columns "CourseName" and "InstName'; CourseName takes its values in a combo box from "CourseName" in "Course" table; "InstName" take its values in a combo box from "InstName" in the "Instructor" table.

    Problem: If the tables "Instructor" and "Course' are deleted all the values in the "Course" field of the "timesheet" table suddenly turn into numbers and the values in the "InstName" remains the same.

    Why is this so.

    This presents a problem in the query on the "TimeSheets" Table even if there are no deletions. A query is successful on the "InstName" field but any query on the "CourseName" field returns all blank unless numbers are entered.

    Can this phenomenon be explained?

    Thanks in advance.

  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,929
    You are probably saving the autonumber primary key, not the descriptive text.

    Do you have lookups set in tables? I NEVER do that. Review http://access.mvps.org/access/lookupfields.htm
    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
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    yes I am using lookups

  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,929
    Regardless of the value showing in the table because of the lookup alias, the actual value is the autonumber primary key that was saved as foreign key. Use that value in query criteria. This is why I never set lookups in tables. I want to see the actual value when I view tables. Set lookups in comboboxes on forms.
    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
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295

    Table Problem

    I fully understand what you are saying, but I need to have a dropdown list in the table facilitate easy entry of data. Also can you explain why a query can be done on the values in the InstName field and not on the CorseName field when both are lookups in the table?

  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,929
    I don't allow users to interact with tables and queries. That's what forms and reports are for.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295

    Table prolems

    Thanks very much for your advice. I truly understand what you are saying and I tried it for the first time - it worked and now this principle would guide the development processes of my future databases.

    George

  8. #8
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Pleas mark this as solve - I can find the button
    Thank you

  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,929
    It's the Thread Tools dropdown above the first post.
    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.

  10. #10
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Thank You for the information and marking as Solved

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

Similar Threads

  1. Linked Table Problem
    By annieloux in forum Access
    Replies: 2
    Last Post: 09-22-2011, 01:03 PM
  2. Table problem
    By imlost2 in forum Access
    Replies: 1
    Last Post: 09-05-2011, 03:36 PM
  3. cross table problem
    By humanmaycry in forum Queries
    Replies: 3
    Last Post: 07-20-2011, 12:08 PM
  4. Table/Relationship Problem?
    By WallbrownF in forum Access
    Replies: 7
    Last Post: 05-26-2011, 12:22 PM
  5. Table / Form problem
    By mayler in forum Access
    Replies: 1
    Last Post: 05-15-2009, 07:09 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