Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 14th, 2005, 12:00 AM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access Form Questions

Hello,
  I am new to Access and some what familiar with VBA, ANY help would be GREATLY appreciated! I know Access has a query tool but my customer wants something easier to handle. So, I would like to build a GUI that lets the user select items for an attribute and then output all records with that item for that attribute, and also be able to select multiple items for different attributes with ORs placed between each item.

The over all goals would be to build and submit mSQL commands to Access. I would like the user select items from combo boxes and then select which items to include in the output. The guts of the form would then take these selections and build a mSQL statement that would be processed. The outputs could be in an Access table or exported to Excel at the user request.

Here is an example:
The database contains car information: color, year, make, and model. The form would have a combo box for each attribute. The user can select green, red, 1999, Saturn, and LS300. The form would then build a mSQL statement like:

Return all cars where color = green OR color = red AND year = 1999 AND make = Saturn AND model = LS300.

This statement would then be sent to Access and the results would be placed in an Excel spreadsheet that the user named and chose the location for.



Here are some questions. Any help, suggestions, or page numbers in the book would be greatly appreciated.

Question 1:
Should this be done in VB.net or Access forms?

Question 2:
I currently have combo boxes for each attribute I want the user to pick from but the list of items in the boxes is not unique and out of order. How do I fix this?

Question 3:
Is it possible for the combo box to stay open such that user can select multiple items? The SQL script would include ORs between each item for a column and ANDs between columns.

Question 4:
Is it possible to include a output box that allows the user to select the output to go to an Access table or an Excel spreadsheet?

Question 5:
Once all the selection are made and the mSQL commands put together how would the form submit them to Access?

Please excuse inaccuracies in the example and if I am using certain terms incorrectly. I look forward to your responses.

Steve



 
Old January 14th, 2005, 12:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Have a look at http://www.mvps.org/access/forms/frm0045.htm for an open source, ad hoc query tool that exports to Excel, etc. Just download the form and import it into any .mdb file.

Bob

 
Old April 12th, 2005, 06:38 PM
Registered User
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help. Since my original post I have pretty much finished construction of a stand alone query tool.






Similar Threads
Thread Thread Starter Forum Replies Last Post
form with conditional questions jcrowley PHP How-To 0 January 30th, 2007 12:02 AM
Form email Questions John10Yes ASP.NET 2.0 Basics 4 September 15th, 2006 10:58 AM
Javascript Form Questions The_Jackal Javascript How-To 0 August 24th, 2004 12:50 PM
First normal form and attachement questions?? wasaan SQL Server 2000 2 July 17th, 2003 09:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.