[Last Call] Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2007-08-02
Medium Priority
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 93

Expert Comment

by:Patrick Matthews
ID: 19616336
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 53

Accepted Solution

Vitor Montalvão earned 1500 total points
ID: 19616678
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.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

829 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