Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2013
    Posts
    18

    Unanswered: Using DLOOKUP to fetch data from table

    Hi All,

    I'am facing issue with DLOOKUP,

    Actually the program flow is like i have a table of 25 fields, ID as PK and item name, item code and remaining is the date as field name,

    below mentioned is the Table heddings,
    "ID" "Item Name" "Item Code" "10/29/2013" "11/5/2013" "11/12/2013"

    problem is that when im doing dlookup on date getting wrong result...

    this is what im using in my codes.
    DLookup("11/12/2013" , "tbl_Name", "ID = " & rs.Fields("TRANSID") & "")

    thanks in advance
    Prasanna R.D

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Giving such names to columns is a bad idea: you should only use alphanumeric characters and the underscore (_). Try:
    Code:
    DLookup("[11/12/2013]" , "tbl_Name", "ID = " & rs.Fields("TRANSID") & "")
    Have a nice day!

  3. #3
    Join Date
    Sep 2013
    Posts
    18
    Hi Sinndho,

    Thank you very much.... its working perfectly...

    Regards,
    Prasanna

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •