Results 1 to 3 of 3
  1. #1
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88

    tempvar update query date field


    hello,

    i have a query and i have a date field in it, and in the criteria of the date field there's this macro
    Code:
    >=[TempVars]![VarStartDate]
    i want to add
    Code:
    <=[tempvars]![VarEndDate] in that criteria
    and thats about it

    but i dont exactly know how im supposed to do that ....

    i want to have
    Code:
    >=[TempVars]![VarStartDate] and <=[tempvars]![VarEndDate] in one criteria
    thats basically it ... i just want to merge them together

    so in my other form where i have 2 textbox's with one button with temp vars in them so they could update the subform

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Did you try the expression you posted? It should work.

    Or try:

    Between [TempVars]![VarStartDate] And [TempVars]![VarEndDate]
    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.

  3. #3
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    ehh ... it worked... i guess i wrote it right and i diden't even experiment it .. i mean i did .. but i had a master child field in the subform and in the master field was empty i had no value in it, and when i did have value in it the dates were set off course so.... umm thx for pointing out the and bit was the answer

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

Similar Threads

  1. Need to use an update query on date string field
    By clawschieff in forum Queries
    Replies: 2
    Last Post: 01-28-2014, 02:07 PM
  2. [HELP] Textbox field update from query
    By janthony in forum Forms
    Replies: 3
    Last Post: 10-18-2013, 07:36 AM
  3. Replies: 3
    Last Post: 01-09-2013, 10:13 AM
  4. Replies: 3
    Last Post: 12-13-2012, 01:51 PM
  5. Replies: 3
    Last Post: 08-16-2012, 11:25 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