+ Reply to Thread
Results 1 to 2 of 2

Excel 365 VBA: Filter sql query with form

  1. #1
    Registered User
    Join Date
    07-30-2021
    Location
    Germany
    MS-Off Ver
    Office 365
    Posts
    1

    Question Excel 365 VBA: Filter sql query with form

    Hi everyone,

    I have a sql query in my vba code.
    My data connection uses ado.
    The query result will be stored into my table.

    Now I want to use a form in order to set the date range and a name filter where I can chose a name or if not all names will be selected, see attached screenshot.
    Field 1 = start date, field 2 = end date and field 3 a list filter.


    form.jpg


    Let's say we have a sql query like:

    Please Login or Register  to view this content.


    I already created the form but how to use the bind variable to my sql code? And how call this form?
    First the form has to be called that the user can insert a date or select a name.


    Thanks for any advice or example.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,178

    Re: Excel 365 VBA: Filter sql query with form

    something like:

    Please Login or Register  to view this content.

+ 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. I'd like to create a Form to set criteria for MS Query in Excel 2003
    By charlylynn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2013, 04:23 AM
  2. Web Query - Change a word in query to form a new query
    By scottymelloty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 04:13 AM
  3. Create a query/filter in excel
    By losdamianos in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-19-2010, 04:25 AM
  4. query/filter form
    By akq125 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2010, 06:58 PM
  5. Filter a Query by a Form win an operator
    By dgaller in forum Excel General
    Replies: 0
    Last Post: 02-22-2009, 05:16 PM
  6. Query a table and return results into my Excel Form
    By johncassell in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2007, 07:41 AM
  7. Replies: 2
    Last Post: 07-30-2005, 01:05 PM

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