Results 1 to 5 of 5
  1. #1
    mackmaru is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Posts
    12

    Passing values from one form1 to form2, then using query to generate report

    Hi there
    I haven't touched Access 2007 for a long time. This situation is this.
    Client Form (Form1) has a button that goes to Jobs Form (Form 2) - This is a one to many relationship.
    When creating a new job I pull data from Form 1 using Properties\Data\... to pull data from each field I want to show on Form2 eg, PK ID, Full Name, Address, and specifically a YES/NO box used when job is completed.
    This uses =[Forms]![Form1]![PKID], which works fine. However when I create a query to find all jobs that are "YES" or "NO", all fields that use =[Forms]![Form1]![PKID] etc do not show on the report.
    I dont know why. Please help. ( The values are not being saved in those fields)

    Regards

  2. #2
    Minty is online now VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Firstly if you record the PK of the master table there is no need to record anything else in the child table that relates to it, unless that data might change and it's important you capture it at that time.
    Static data such as Full Name etc shouldn't be recorded again in the job table. You are duplicating data for no reason.

    Secondly - the Yes No box - if it's important why aren't you storing the data?
    Do you have a Completion date ? if so the Yes / No is redundant ?

    For a report the data has to be in the queries underlying data, so either store it or calculate it.

    It might help to show your tables and the relationships , in case I've got the wrong end of the stick?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    mackmaru is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Posts
    12
    I think I understand what you're saying about duplicating data. Let me get back to it and I'll let you know. Cheers.

  4. #4
    mackmaru is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2019
    Posts
    12
    HI there, Thank you so much, that helps. I was over thinking and wanting too much data on my forms/reports. Thank you again.

  5. #5
    Minty is online now VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    No problem, sometime wood from the trees sets in. I know it still does with my work.

    You can always display related data, just don't need to store it.

    Good luck with your project.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 1
    Last Post: 10-03-2017, 02:16 AM
  2. Replies: 15
    Last Post: 03-02-2014, 05:15 PM
  3. Replies: 13
    Last Post: 05-14-2013, 06:01 PM
  4. Replies: 3
    Last Post: 09-19-2012, 11:40 AM
  5. Replies: 1
    Last Post: 12-01-2009, 09:00 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