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

    Dlookup

    With the following code i want to test in my new table if there are already items i have appended from the current query and in the field of each record it says "#Error" and when i click on the cell it displays an error of "The Expression you entered as a query parameter produced this error: 'The object doesn't contain the automation object 'Feb."

    IIf(IsNull(DLookUp("WgeID","t03Wage","Employ_ID08= " & [EmployID] & " AND Wagedate02=" & [WageDate01])),0,1)

    Don't know if i have to use '#" & Format(Wagedate02,"yyyy-mm-dd") & "#'


    please help :3

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    If it's returning "Feb" it sound like your WageDate01 field has a string in it and not a date?

    What is the data type?
    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
    Perfac's Avatar
    Perfac is offline Expert
    Windows 7 64bit Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Quote Originally Posted by Minty View Post
    If it's returning "Feb" it sound like your WageDate01 field has a string in it and not a date?

    What is the data type?
    Date and Time(short date) example "01-Feb-2016"

  4. #4
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    In that case you do need the date delimiters
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Shortening if / dlookup >0 / then dlookup
    By Jack Russel in forum Modules
    Replies: 1
    Last Post: 02-19-2016, 03:01 PM
  2. DLookup help
    By vicsaccess in forum Programming
    Replies: 2
    Last Post: 01-10-2016, 11:35 AM
  3. Like in Dlookup
    By msp4422 in forum Programming
    Replies: 3
    Last Post: 02-19-2013, 04:02 PM
  4. Dlookup help
    By jcaptchaos2 in forum Access
    Replies: 17
    Last Post: 04-21-2011, 01:33 PM
  5. DLookup
    By neil45156 in forum Forms
    Replies: 1
    Last Post: 04-11-2011, 11:31 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