Results 1 to 6 of 6
  1. #1
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618

    Expression

    Where I am it is 02H40, half asleep. Missing something here.

    MntNum169: DLookUp("MntID038","q01Month", #" & Format(WriteOffDate169,"yyyy/mm/dd") & "# Between [FstDayOfMnth038] And [LstDayOfMnth038]")
    Click image for larger version. 

Name:	Q01Mnt.png 
Views:	26 
Size:	44.5 KB 
ID:	38174Click image for larger version. 

Name:	Q02AWO.png 
Views:	25 
Size:	64.5 KB 
ID:	38175Click image for larger version. 

Name:	Q02AWO2.png 
Views:	25 
Size:	113.4 KB 
ID:	38176

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    try a different format for date range: mm/dd/yyyy
    you don't have to view it that way, but a query may need it that way.

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Look at the DLookup() syntax again. You are missing the criteria field name.

    Try something like:
    Code:
    MntNum169: DLookUp("MntID038","q01Month", "WriteOffDate169 Between #" & FstDayOfMnth038 & "# And #" & LstDayOfMnth038 & "#")
    where WriteOffDate169 is a field in the domain (which can be a query)

  4. #4
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Quote Originally Posted by ranman256 View Post
    try a different format for date range: mm/dd/yyyy
    you don't have to view it that way, but a query may need it that way.
    Same error message.

  5. #5
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Thank you. Its asking for parameter value on FstDayOfMnth038 and LstDayOfMnth038. WriteOffDate169 is local. Other two are foreign.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Maybe you could make a demo dB with just the table, form and query?

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

Similar Threads

  1. Replies: 2
    Last Post: 03-11-2019, 01:26 PM
  2. Replies: 2
    Last Post: 11-16-2017, 03:33 AM
  3. Replies: 4
    Last Post: 05-03-2016, 01:51 PM
  4. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  5. Replies: 4
    Last Post: 10-26-2012, 12:49 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