Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    1. In the subform, set the default value on the PersonId field to the parent form's PersonID


    2./3. dunno right off. I'll have to look when I get home.

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Textbox ControlSource cannot directly reference a field that is not included in the form's RecordSource and not in a combo or list box column.

    Suggestion:

    Change the PhoneNumberType textbox to a combobox. Property settings:

    RowSource: PhoneNumberTypes
    ControlSource: PhoneNumberTypeID
    ColumnCount: 2
    ColumnWidths: 0";1"
    BoundColumn: 1

    My preference would be to eliminate PhoneNumberTypeID and simply save the descriptors (Office, Home, Mobile) or at least use O, H, M instead of 1, 2, 3.
    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. #18
    wardw is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    May 2013
    Location
    Hines, Oregon
    Posts
    41
    Thanks, June7. I've implemented your changes, including the suggestion to eliminate PhoneNumberTypeID as an autonumbered primary key in the PhoneNumberTypes table. Now, PhoneNumberTypeID is the primary key but a text field containing records "Office", "Home", and "Mobile". There's no PhoneNumberType field now. After a tweak to another table to accommodate this change, the entire database now works just the way I want! I can specify with a combo box the phone no. types, and all new contacts and data are saved properly to the tables.

    The reason I wanted an autonumber primary key for phone no. types was that this database is actually a much simplified version of a larger database I need to build, where instead of contacts with multiple phone numbers it will be peoples' obituaries with multiple obituary notices in different newspapers. Main form has data on deceased, subform has data on multiple obituaries. I built that, but it was so complex it was hard to fix, so I built a simple model with similar requirements. Now (thanks to your and Dals' help) all I have to do is translate the simple model's setup to the big database. For that one, I'm thinking I'll need to reinstate the autonumber primary key to facilitate searches; I'll see.

    Anyway, thank you again June7 and Dal, for your help. You'll probably hear from me again if I have trouble doing the porting over to the big DB. I've enclosed the properly functioning version in case others need the code.
    Attached Files Attached Files

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-20-2012, 01:59 PM
  2. Replies: 5
    Last Post: 11-16-2011, 07:30 PM
  3. Replies: 3
    Last Post: 10-03-2011, 02:33 PM
  4. Replies: 7
    Last Post: 07-15-2011, 01:58 PM
  5. Replies: 9
    Last Post: 12-15-2010, 01:44 PM

Tags for this Thread

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