Results 1 to 2 of 2
  1. #1
    jdunn36 is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2010
    Posts
    1

    Unhappy Code to pull in data from a specific record


    I am creating a database for my job that tracks projects. I have a form set up that when you choose a project name, it automatically pulls the pertinent information related to that project and you can then add records specific to the progress of that project. So, I have a separate table for the project info and then a table for the project details. What I am trying to do, which I cannot figure out is have side-by-side columns on the form that pull information from the last record PERTAINING TO THAT PROJECT. I was able to figure out to pull info from the last record, but if the previous record is related to another project, it obviously isn't accurate. I know it would require code, but not sure how to go about this. HELP!!! I'm already past my deadline and stumped.

    I can provide the actual DB since it just contains dummy data at this point if someone is able to get in touch with me.
    Last edited by jdunn36; 09-20-2010 at 12:06 PM. Reason: Need to upload my file

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    upload your file and you'll probably get a better response. Try that first.

    Also, you say that you want to have columns side by side. What kind? ones that are generated from an AutoForm? Or just manually positioned controls on the form, like textboxes? If you've already figured out how to pull data from the last record, why are you worrying about pulling the data from the next to last record? If you're pulling from the last record in the DETAILS table, everything you should want to display on your form should already be in that record, shouldn't it?

    What is the statement you are using to generate your form? Is it an actual object source, or sql? What is it? Ideally, if you are using one form, it should look like:
    Code:
    SELECT projects.pID, projectsdetails.info1, projectsdetails.info2, etc...
    
    FROM projectsdetails INNER JOIN ON projectsdetails.pID = projects.pID
    
    [WHERE projects.pID = YOUR PROJECT ID]

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

Similar Threads

  1. Pull Data from another table
    By bbranco in forum Access
    Replies: 1
    Last Post: 06-19-2013, 06:15 AM
  2. Text Box to show specific record
    By chu3w in forum Forms
    Replies: 1
    Last Post: 04-01-2010, 12:23 PM
  3. Replies: 1
    Last Post: 03-23-2010, 09:18 AM
  4. specific record
    By thewabit in forum Access
    Replies: 8
    Last Post: 02-17-2010, 11:32 PM
  5. Only pull out curtain data from a query
    By mela in forum Queries
    Replies: 0
    Last Post: 12-08-2009, 12:20 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