Results 1 to 6 of 6
  1. #1
    noahtomlin is offline Novice
    Windows 10 Access 2007
    Join Date
    Nov 2019
    Posts
    2

    Important help with a field

    I am an archivist with a synagogue who is creating a database of historical documents.



    One thing my client wants is a list of what congregants are listed in a particular document, and the ability to narrow a search down to documents that list X congregant.

    I was able to create this using a standard field (having to make compromise to use a radio box system), but the lookup only shows surnames, not first names.




    Attempts to modify this in Design View have not succeeded. Properties of the lookup currently look like this:




    I am slowly realizing that I'm in way over my head, but the database is too far into development to change course. The main priority here is to change the lookup in the field so both surname and first name (stored as LastName and FirstName in the table) are visible.

    Thank you for helping a panicking but determined newbie through this!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    This is not a 'standard' field - it is a multi-value field. I NEVER use multi-value fields. But if you must, should not store name but person ID. Your table does not have a unique identifier primary key defined. Add an autonumber field called PersonID. Then combobox properties:

    RowSource: SELECT PersonID, LastName & "," & FirstName AS Fullname FROM people_1 ORDER BY LastName, FirstName;
    ColumnCount: 2
    ColumnWidths: 0";1"
    BoundColumn: 1
    ControlSource: a long integer number field to save PersonID as foreign 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.

  3. #3
    noahtomlin is offline Novice
    Windows 10 Access 2007
    Join Date
    Nov 2019
    Posts
    2
    It works now for adding stuff with the radio boxes. However, the filter field is now completely empty. Is that a side effect of adding a new value to the multi-value field, making the old entries obsolete?

    Additionally, attempting to make a custom lookup for LastName, FirstName gives me this error:


  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Yes, if you are switching to autonumber primary key as I suggested.

    You would have to do what it says - delete relationship - delete the field and create a new field of long integer type so it can receive autonumber value as foreign key. But you will lose data so if you have a well-used db loaded with data, probably don't want to do this.

    I NEVER use multi-value field and I NEVER build Lookup field in table - especially with Lookup wizard. Once these things are created they are difficult to get rid of.

    What radio boxes?
    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
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,742
    You have a many-to-many relationship between documents and congregants which you've approached with a multivalue field.
    Here's a way to convert that to a conventional M-T-M setup. Try it on a copy of your DB.
    https://www.accessforums.net/showthread.php?t=77252

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Noah,

    Getting your tables and relationships designed and tested to ensure they meet your requirements is critical to a well-functioning database. Too often people (newbies included) jump to physical Access database expecting the software to do something magical.
    Note to Noah and others --it doesn't work like that. Analyze your requirement, make a model with pencil and paper, test your approach with some sample data and scenarios.
    See the Database Planning and Design link in my signature for articles that may be helpful to you and your project. You may find the short BA-Experts links helpful with analysis (and humorous).

    I agree with June - advise against multivalued fields and lookups at table field level. Opt for proven lookup tables approach.
    Good luck.

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

Similar Threads

  1. How important IS referential integrity?
    By IncidentalProgrammer in forum Database Design
    Replies: 9
    Last Post: 07-22-2015, 04:20 PM
  2. Replies: 9
    Last Post: 05-15-2012, 01:57 PM
  3. Opening tables for important database
    By SemiAuto40 in forum Programming
    Replies: 5
    Last Post: 04-19-2012, 10:30 AM
  4. Please Help Updating Form from Table Important
    By crcastilla in forum Access
    Replies: 5
    Last Post: 08-20-2011, 01:53 AM
  5. Important queiry for the inventory
    By nardionline in forum Queries
    Replies: 4
    Last Post: 12-11-2010, 05:45 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