Query problems recreating an Access 2007 query in an Access 2007 ADP

Posted on 2007-08-02
Last Modified: 2013-12-05
Using SQL Server 2005 from an ADP front-end. I am trying to recreate an Access query in the ADP. I'm having trouble creating a field based on an expression such as NewField:if(x,y,z). Is this possible? Also, can I use a form field reference as a criteria expression in the new query?
Question by:rdperkins
    LVL 92

    Expert Comment

    by:Patrick Matthews
    Hello rdperkins,

    Please post the Jet SQL you used in Access.  Sounds like it needs to be redone in T-SQL for
    SQL Server (in this particular case, looks like Jet's IIf() becomes a CASE structure).


    LVL 44

    Accepted Solution

    Seems to me that MS Access query is using VB functions, so you can't pass it directly to SQL Server.
    Reference to forms fields aren't allowed in SQL Server.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now