+ Reply to Thread
Results 1 to 1 of 1

Can I place a function call withing SQL Statements?

  1. #1
    Registered User
    Join Date
    10-06-2006
    Posts
    82

    Can I place a function call withing SQL Statements?

    Dear Excel/ VBA Expert

    I am trying to import data from an MS Access database into my Excel Sheet.
    Usually I have no problems with this process but today I need a VBA function in the SQL statement (I know I can do this with nested IIF()s but I want to know how to do this for future reference)

    I have written the SQL statement in MS Excel
    I have written the VBA function in MS Access because that is where the SQL is processed. Is my understanding correct in this regard?

    ASIDE: Please comment on this.
    (I just got an idea of doing this.... perhaps I can run a VBA function from within Access that has the SQL statement because I know it works in MS Access(I tested the below just in Access (not running the intial SQL in Excel)). However, why doesn't this work from within Excel?

    '******The error Message is attached thanks.

    ' CODE IN MS Excel. Importing Data from access

    Please Login or Register  to view this content.

    Your Help is much Appreciated.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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