Results 1 to 4 of 4
  1. #1
    vinsavant is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    20

    Passing a Date Value from one Form/Table to another.

    Hi!



    I have a table called tbl_Main which feeds a form called frm_Main

    I have added a dated field called ReplyBy to the Main table and form and would like to pass this value to another table and from. That second Table/Form is called tbl_Response and frm_Response.

    Thanks!

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Possibly use DLOOKUP function?
    See: https://www.techonthenet.com/access/...in/dlookup.php

    Or create a query that links the two tables, and returns the fields that you want (you can use Queries as the Data Source of your Form just as easily as you can Tables).

  3. #3
    vinsavant is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Dec 2012
    Posts
    20
    Thank you for your prompt reply. If all possible I would like to add the functionality to the existing tables/forms since I have a lot of other reports already depending on them and it would take me a long time to recreate. Can you show me where /how to add this Dlookup function on a table or form?

    Thanks!

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You would use DLOOKUP on the Form, not the Table. You should never have calculations in your Table.

    If all possible I would like to add the functionality to the existing tables/forms since I have a lot of other reports already depending on them and it would take me a long time to recreate.
    Actually, it is much easier than you think. You don't really have to recreate anything, just make a few minor edits.

    If you create a new Query that shows all the Table fields you need from both Tables (you could easily just click * to show them all) and save it, then all you need to do is to open up your existing Form, go to Properties and change Record Source from your Table name to your Query name. Since you should still have all the same fields and field names, you shouldn't have to change any of that.

    I ALWAYS base my Forms on Queries instead of Tables directly. Makes it really easy to add filters or calculations on-the-fly without having to re-do a bunch of things.

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

Similar Threads

  1. Replies: 12
    Last Post: 04-14-2017, 03:17 PM
  2. Date field not passing to report
    By mdaccess in forum Forms
    Replies: 1
    Last Post: 01-29-2015, 09:56 AM
  3. passing a date from a form to a query
    By bbxrider in forum Queries
    Replies: 4
    Last Post: 12-12-2014, 05:52 PM
  4. Passing A Date Range From Form To Report
    By JeffGeorge in forum Reports
    Replies: 3
    Last Post: 03-11-2014, 12:50 PM
  5. Passing a NULL value to a date field
    By lman in forum Queries
    Replies: 2
    Last Post: 02-22-2011, 02: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