+ Reply to Thread
Results 1 to 5 of 5

I'd like to create a Form to set criteria for MS Query in Excel 2003

  1. #1
    Registered User
    Join Date
    09-18-2013
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 and MS Query
    Posts
    3

    I'd like to create a Form to set criteria for MS Query in Excel 2003

    Hello,

    I have a spreadhseet that has an excess of 30,000 rows (information about housing stock) and I want my users to be able to specify the criteria they require so they only see the rows of information relevant to them. Normally 10-20 out of the 30,000+.

    I have used MS Query to successfully manipulate the data and return the required results on a new worksheet, but my end users are non-IT (case work) staff so I want to provide them with a basic form for specifying the relevant criteria (as much or little as required) and a 'go' button to run the query. - The User form does part of this, but doesn't provide a printable list like MS Query does.

    E.G.
    Number of bedrooms = >2
    Post Code = G13
    Floor = <1

    The crietria will change everytime someone uses the form, so a fixed query will not work. Is it possible to use VBA to create the form that will then run the query with the specified criteria?

    I also have the added issue that the workbook needs to be protected to prevent changes, but with protection enabled I cannot start the Query Wizard.

    I know I should (and I would prefer) to do this in MS Access, but for a number of reasons that is not an option. Also, I am hindered by still (!) using Office 2003...

    Any and all help will be gratefully appreciated!

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: I'd like to create a Form to set criteria for MS Query in Excel 2003

    Perhaps you can use advanced filter rather than MSQuery? So your users may enter the criteria below each column heading and then your code will copy the filtered data from the hidden data sheet to a new results sheet.

  3. #3
    Registered User
    Join Date
    09-18-2013
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 and MS Query
    Posts
    3

    Re: I'd like to create a Form to set criteria for MS Query in Excel 2003

    Thank you for your very prompt reply, but I'm afraid I don't fully understand what you mean.

    I currently don't have any hidden data sheets (why would I hide them?) and as I stated in my original post, I don't have any code yet either... Can you maybe give me an example of what you mean (sorry if I am being dim!)

    I have tried to use the filter options to return desired results but it is limited, I will have another look at the advanced filter though.

    Thanks again,
    Charly

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: I'd like to create a Form to set criteria for MS Query in Excel 2003

    It was my assumption that you did not want the users to be able to see or change the data? Hiding the sheet would be a simple way to do that - but not foolproof of course!

    A code example would be like this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-18-2013
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 and MS Query
    Posts
    3

    Re: I'd like to create a Form to set criteria for MS Query in Excel 2003

    Thank again for the reply. Users should be able to see all the data (that's why I am giving it to them) but I want it to be read-only.

    When I tried using the advanced filter I didn't get the results I expected (I was missing some rows, which definietly matched the criteria) and it is still somewhat complicated for users with limited/no Excel experience, hence wanting to provide them a simple form like the Userform which will run a query/filter for them...

+ 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. [SOLVED] How to have bound text box in form as criteria in query?
    By jgomez in forum Access Tables & Databases
    Replies: 2
    Last Post: 01-08-2013, 01:15 PM
  2. excel 2003 query criteria field value help
    By davidtla in forum Excel General
    Replies: 2
    Last Post: 10-20-2008, 10:10 AM
  3. Web Query (Excel 2003)
    By Dawgman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2006, 12:00 PM
  4. Excel 2003/MS Query - Query Defn Lost
    By ksp1 in forum Excel General
    Replies: 0
    Last Post: 10-12-2005, 06:05 AM
  5. create a data entry form template in Excel 2003?
    By david.bottomley@haltoncollege in forum Excel General
    Replies: 0
    Last Post: 01-19-2005, 06:06 AM

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