+ Reply to Thread
Results 1 to 3 of 3

SQL/DLookup/Pulling the same field multiple times

  1. #1
    Registered User
    Join Date
    12-20-2013
    Location
    St. Louis, MO
    MS-Off Ver
    Excel 2010
    Posts
    32

    SQL/DLookup/Pulling the same field multiple times

    Hello All,

    I have the following expression: January: FormatPercent(DLookUp("[EOM]","OpsFeeDataQuery","[Audit Month]=1" And "AGENTID=[Enter AgentID]"),0)

    That I can not get to work it seems the best route for this would be to go with SQL which I thought would be this:



    Please Login or Register  to view this content.

    But I get error syntax/missing operator error message...

    My entire query thus far looks like this:


    Please Login or Register  to view this content.
    I need the query to have a field for each month (Jan, Feb, Mar, etc.) that pulls this info based on the parameters I have included a copy of my db also QA Database.zip

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2407 Win 11 Home 64 Bit
    Posts
    24,069

    Re: SQL/DLookup/Pulling the same field multiple times

    Your macro fails upon opening the db. No data to test.
    Which query is your issue with?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SQL/DLookup/Pulling the same field multiple times

    You don't give criteria an alias, so drop AS January.
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. help with dlookup
    By enhydra in forum Access Programming / VBA / Macros
    Replies: 8
    Last Post: 06-07-2011, 05:35 PM
  2. Pulling information from a field as displaying as a title
    By dwarford101 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2010, 11:44 AM
  3. total to date field adjusted multiple times
    By debrant in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-06-2009, 11:55 PM
  4. Pulling single entries duplicated many times in column
    By markwilest in forum Excel General
    Replies: 1
    Last Post: 05-09-2008, 10:54 AM
  5. DLOOKUP AND VLOOKUP IN VBA
    By Souris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2005, 12:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1