Results 1 to 2 of 2
  1. #1
    St.Alphonzo is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2015
    Posts
    9

    Locate and edit source record from a query...?

    I'm not sure if I'm in the right section but here's my dilemma:


    I have two tables.. one that stores vendor costs [JobCosts] and one that stores employee hours [EmployeeHours] ... each feed a select query ([Extract_Labor] and [Extract_Other]) that filters out non-billable entries as well as calculates billing and pay rates .... and these two queries are joined in form a union query called [allcosts].

    What I need to be able to do is use the value from from [allcosts].UniqueID to filter the source table so I can go to the original entry and edit it.

    Here I am at the record in [allcosts]:



    Click image for larger version. 

Name:	allcosts.PNG 
Views:	7 
Size:	21.6 KB 
ID:	31368

    and here's where I want to be in the table where the data is stored...
    Click image for larger version. 

Name:	jobcosts1.PNG 
Views:	7 
Size:	16.7 KB 
ID:	31366
    or the form that feeds the table....
    Click image for larger version. 

Name:	costform.PNG 
Views:	7 
Size:	49.9 KB 
ID:	31367


    We're generally looking at this data after its been joined, so if something is incorrect or otherwise needs adjustment, I need a quick way to get to that source data instead of manually navigating and filtering.... any help would be much appreciated!
    Attached Thumbnails Attached Thumbnails allcosts-1.PNG  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Need a form bound to AllCosts or a form opened in Report view (not PrintPreview). Click on record on form or report. Open another form filtered by UniqueID value in the selected record.

    DoCmd.OpenForm "JobCosts", , , "UniqueID=" & Me!UniqueID

    The really trick is figuring out what event to put code in. Could be DblClick on the UniqueID textbox.
    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. update / append query to edit single record
    By zernon916 in forum Queries
    Replies: 4
    Last Post: 03-21-2017, 04:16 AM
  2. Replies: 4
    Last Post: 07-01-2016, 07:09 AM
  3. Replies: 5
    Last Post: 06-16-2014, 08:01 AM
  4. Replies: 32
    Last Post: 05-23-2013, 04:16 PM
  5. Use VBA to edit record or create new record in a query
    By ryantam626 in forum Programming
    Replies: 11
    Last Post: 08-09-2012, 02:37 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