Results 1 to 6 of 6
  1. #1
    amita is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Posts
    4

    How to add Form with SubForm & make both of them editable?

    Hi,

    I have 2 tables:


    1. ContactDetails - having id, address
    2. Client - having id,name,resAddrId
    resAddrId in Client table is foreign key for Id in ContactDetails table

    Now I tried designing a form with Client & ContactDetails table using subForm but everytime Client form is coming as Subform.What might be the problem? Kindly help.

    Thanks,
    Amita

  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,521
    I would expect the ID from client to be a foreign key in the contact details table. What data do they contain, or more accurately how do they relate to each other?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    amita is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Posts
    4
    ContactDetails Table Data:
    -----------------------------
    Id Address LandMark City
    ------------------------------------------------------------------------
    101 101, New Empire House Near Main Gate Delhi
    102 509, My Office Adddr Near Small town Rd Mumbai

    Client Data:
    ============
    Id Name resAddrId officeAddrId
    ------------------------------------------------------------
    301 Mr.Dsouza 101 102

    & so On.....
    So resAddrId of Client Table = Foreign Key for Id in ContactDetail table
    & officeAddrId of Client Table = Foreign Key for Id in ContactDetail table

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would probably have something like this, adding a type field to denote what type of address each is:

    ContactDetails Table Data:
    -----------------------------
    Id Address LandMark City ClientID AddType
    ------------------------------------------------------------------------
    101 101, New Empire House Near Main Gate Delhi 301 R
    102 509, My Office Adddr Near Small town Rd Mumbai 301 O

    Client Data:
    ============
    Id Name
    ------------------------------------------------------------
    301 Mr.Dsouza

    That let's you have more addresses if needed, like shipping, etc.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    amita is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2014
    Posts
    4
    Thanks Mr.Paul,

    I implemented the design changes you suggested & it worked.

    Thanks a Lot !

    Regards,
    Amita

  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,521
    Happy to help!
    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. Unbound Form and Editable Subform
    By tndinnc in forum Forms
    Replies: 6
    Last Post: 04-19-2013, 05:42 PM
  2. Make sub query un-editable
    By esh112288 in forum Forms
    Replies: 2
    Last Post: 11-11-2012, 06:35 PM
  3. Replies: 18
    Last Post: 04-22-2012, 11:39 AM
  4. Replies: 1
    Last Post: 04-18-2012, 07:38 AM
  5. Populate Form And Make Editable
    By Rick5150 in forum Forms
    Replies: 1
    Last Post: 10-04-2011, 09:04 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