Results 1 to 5 of 5
  1. #1
    rd.prasanna is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    25

    Angry 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
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Why does table have dates as field names? You have to keep adding new fields periodically? This is a poor design. There is a limit on number of fields in table. Try enclosing the field name in [] within the quote marks: "[11/12/2013]"
    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
    rd.prasanna is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    25
    Sure june7,


    thank you...

  4. #4
    rd.prasanna is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    25
    Yes june7, actually i have add new field periodically... every week...
    so i opted for this....

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You will eventually hit field limit. This is not a normalized design and will be problematic in so many ways.
    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.

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

Similar Threads

  1. Query to fetch a rating based on another table
    By brianeveretthoffman in forum Queries
    Replies: 1
    Last Post: 11-13-2012, 12:30 PM
  2. How to fetch Column names of a table
    By deepanadhi in forum Queries
    Replies: 21
    Last Post: 06-04-2012, 06:17 PM
  3. Fetch Data From MS-Access
    By kashif.special2005 in forum Programming
    Replies: 1
    Last Post: 08-27-2011, 05:50 AM
  4. How to fetch latest records from table
    By India62 in forum Access
    Replies: 13
    Last Post: 05-19-2011, 11:43 PM
  5. Need Query to fetch last row in a table
    By gunapriyan in forum Queries
    Replies: 10
    Last Post: 02-20-2010, 12:46 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