Results 1 to 2 of 2
  1. #1
    RIRinkRat is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    1

    Query..Module..Macro....HELP!!!

    Need help with something that will look a multiple field and based on the field that meets the criteria, us the value in that field (date) to populate a new field that I can use on a report.



    if [startdate1] is Between Date() And Date() +60, then use [startdate1],
    if [startdate2] is Between Date() And Date() +60, then use [startdate2],
    if [startdate3] is Between Date() And Date() +60, then use [startdate3],
    if [startdate4] is Between Date() And Date() +60, then use [startdate4]

    All of this information is entered into one table (Lease document). I have 5 different date fields that do not overlap. I want to be able to look at all of the dates and use the date field that is from today to 60 days in the future. I can select the records that meet this criteria.

    There is also 5 different currency fields that are associated each one of those dates fields. In a query (for a report), I need to display the date field (I was thinking in a new field) that meets the criteria and associated currency so I can due some calculations on those numbers.

    I also looked at trying to create different table where the associated date and currency fields are entered, but I need to be able to entered multiple records from one Form that also has information which belongs to another Table.

    ANY IDEAS...PLEASE!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Cross posted, but I'll give you the same answer here. The dates and currencies should be in a related table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 08-16-2012, 11:16 AM
  2. Module Error in Macro
    By TimMoffy in forum Modules
    Replies: 3
    Last Post: 06-20-2012, 09:52 AM
  3. Module to be run by macro to validate
    By GraemeG in forum Modules
    Replies: 4
    Last Post: 02-26-2011, 06:26 AM
  4. Creating Macro from Module
    By Harley Guy in forum Modules
    Replies: 1
    Last Post: 11-08-2010, 07:44 AM
  5. Running module from Macro
    By Harley Guy in forum Modules
    Replies: 6
    Last Post: 10-27-2010, 11:05 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