Results 1 to 4 of 4
  1. #1
    securitywyrm is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    97

    How to edit a field when it uses a cartesian query as part of the record source?

    My situation is as follows



    I'm building a contacts database and I have three tables
    Table 1: Programs, currently 4 data points
    Table 2: Contact titles, currently 3 data points
    Table 3: MainData: Has Program key field, Contact title key field, and Contact Name data. Currently has three data points.

    So I needed a form to show all possible combinations of program and contact title, which should be 12 (4 x 3). To accomplish this, I created a Cartesian query, which gives all 12 combinations: Click image for larger version. 

Name:	Capture2cartesian.PNG 
Views:	10 
Size:	7.6 KB 
ID:	32404

    And then made a form that uses that Cartesian query and the main data table, linking both the IDs... Click image for larger version. 

Name:	Capture3formsource.PNG 
Views:	10 
Size:	13.0 KB 
ID:	32405


    And the result a form that looks exactly like I want it to: Click image for larger version. 

Name:	Capture4formoutput.PNG 
Views:	10 
Size:	15.4 KB 
ID:	32407
    which shows the 3 data points I do have, and the 9 that I don't.

    HOWEVER, I can't edit the contact in this form! What change do I need to make to still have the 12 entries in the form, but have "Contact" edit/create the relevant entry in the main data table?

    Note: Ignore attached file, I clicked the wrong thing, and I can't remove an attachment apparently.
    Attached Thumbnails Attached Thumbnails Brar Instructions.png  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Yes, you can remove attachment from post. What file should be ignored - the last image?

    Cartesian queries (or query using a Cartesian query) are not editable. Period.

    Open another form filtered to the desired record for editing.
    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
    securitywyrm is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    97
    Quote Originally Posted by June7 View Post
    Yes, you can remove attachment from post. What file should be ignored - the last image?

    Cartesian queries (or query using a Cartesian query) are not editable. Period.

    Open another form filtered to the desired record for editing.
    So there's no way to have both the blank spaces in the form and have it editable?

    The way we did this in the last database was that it was a giant flat file with a column for each contact, which became a nightmare to edit when they wanted to change titles and program names. If I use the Cartesian query as a filter, will that work?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Quote Originally Posted by securitywyrm View Post
    If I use the Cartesian query as a filter, will that work?
    I think that was implied in my suggestion.

    DoCmd.OpenForm "Contacts", , , "ContactID=" & Me.ContactID

    The real trick is figuring out what event to put code in.
    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.

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

Similar Threads

  1. Locate and edit source record from a query...?
    By St.Alphonzo in forum Macros
    Replies: 1
    Last Post: 11-21-2017, 02:06 PM
  2. Field Record Source
    By autiger58 in forum Forms
    Replies: 2
    Last Post: 10-11-2016, 05:40 PM
  3. Replies: 6
    Last Post: 07-13-2015, 06:21 PM
  4. Replies: 3
    Last Post: 09-02-2013, 12:58 PM
  5. Replies: 7
    Last Post: 06-30-2011, 12:20 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