+ Reply to Thread
Results 1 to 5 of 5

controls to access a database in a UserForm

  1. #1
    Registered User
    Join Date
    08-11-2007
    Posts
    44

    controls to access a database in a UserForm

    I need to create a wizard to help people using database queries on my spreadsheets.

    This wizard will also require access to the database and display the data in some grid.
    What are the controls available to do that?

    thanks

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    What kind of database queries?

    take a look at the databaseform example here:

    http://www.excel-it.com/vba_examples.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-11-2007
    Posts
    44
    royUK,

    The database is an sqlserver database.
    The users need to chose some small parts of the data that will then be diplayed on a worksheet.
    Choosing this small part implies chosing a few keys by browsing other tables.

    I already tested one workbook to do that.
    The user choses a record in Sheet1, this determines the records on Sheet2, and this Sheet2 is then activated.
    This goes on up to Sheet5.
    In this step-by-step process, only manageable amounts of data are fectched from sqlserver and presented to the use.
    On the way, the user can also fine-tune some parameters, like a period of time or like a wildcard selection for some items.

    The end-result of the process is twofold:

    - two tables suitable for a report (one of a few hundred records, one very short)
    - an excel formula (based on a UDF) that the user will be able to copy where he likes for further use

    The second end-result is the most important, as the main purpose of the application is to help people assembling data for the purpose of some externally-defined reporting (official). (unfortunately this process cannot be further automated because of the lack of normalisation in the extrenal reporting, which is also an excel report )

    Therefore, I would really appreciate if I could transform all this stuff in a userform wizard.
    I would incorporate this wizard in the external report and simplify my life and the life of many other people.

    Thanks for any suggestions.
    Last edited by lalbatros; 08-31-2007 at 05:46 AM.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I would think you can create a Wizard using a UserForm with MultiPage control. The initial code to run the query can be recorded using the Macro Recorder.

  5. #5
    Registered User
    Join Date
    08-11-2007
    Posts
    44
    I made some attempts including the MultiPage and MSO Spreadsheet component as well as a ListBox component.
    I was not happy because I had the feeling I would (again) code more than I would like, probably with ADODB.

    If I want a full-Excel solution I need to find a suitable datagrid component in the existing Office controls.
    I have the feeling I will not find that.
    But I better ask for something like that before I consider a totally different approach.

    Still another possibility (Excel oriented) would be to create an Activex myself from an Access program that would do what I need.

    In summary, I hope to find a way to display queries in a confortable way within an Excel application with the look and feel of a Wizard.

+ 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