+ Reply to Thread
Results 1 to 4 of 4

VBA-Access/SQL Help

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    Chicago, Illinois
    MS-Off Ver
    2013
    Posts
    21

    VBA-Access/SQL Help

    Hi All,

    I have a problem with some code to try and get data from an access database. I know nothing about SQL and have only been learning VBA for the past year. Basically what I am trying to do is open a connection to an access database I have on my computer, go to a table and pull out information. I need be able to pull data based the 2 dates the user will input. Here is what I have so far, but it doesn't seem to return any data, only the headers. Any help would be greatly appreciated.

    I have attached the code I have so far for reference. Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA-Access/SQL Help

    you may try
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    02-07-2014
    Location
    Chicago, Illinois
    MS-Off Ver
    2013
    Posts
    21

    Re: VBA-Access/SQL Help

    Quote Originally Posted by JosephP View Post
    you may try
    Please Login or Register  to view this content.
    That was it!!! That worked perfectly. Thank you for the help. What makes this different from not including the pound sign? I'm curious to know.

  4. #4
    Forum Contributor
    Join Date
    01-21-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    227

    Re: VBA-Access/SQL Help

    Quote Originally Posted by troussis View Post
    That was it!!! That worked perfectly. Thank you for the help. What makes this different from not including the pound sign? I'm curious to know.
    # is the syntax for enclosing dates in Access, like single or double quotes in SQL/MySQL
    If I've been of help, plz add reputation.

+ 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. Use an Excel Macro in Access VBA - Import text file in Access Table
    By joogibabu in forum Access Tables & Databases
    Replies: 3
    Last Post: 10-08-2014, 10:04 AM
  2. import from excel into access to update access, adding or subtracting
    By Tynus in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2014, 01:49 PM
  3. Excel 2010 userform to access and edit the data in MS ACCESS DB tables
    By anand_y59 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2012, 07:46 AM
  4. Access VBA or SQL to find and delete duplicate records in access table
    By ewong in forum Access Programming / VBA / Macros
    Replies: 10
    Last Post: 09-14-2012, 06:55 PM
  5. Generating an Excel sheet and importing it into Access with VBA triggered in Access
    By JungleJme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2012, 07:43 AM

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