Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with SQL query/report in code please.

Status
Not open for further replies.

tmccork

Technical User
Jul 12, 2002
13
US
I am trying to create a form for custom reports. I would like to give check boxes for the different products (t-shirst, Sweatshirts, ect), and with the products checked create a sql query and run a report, from the click of a button. If there is a better way I would be interested too. I am new to this and could use any sugestions. Thanks in advance.
 
Hi

BEfore talking about how to build the SQL query, a point about your proposed user interface.

The idea of check boxes is OK from a user view point, but it does introduce a degree of rigigity if the range of products is likely to change. You will need to change your form, perhaps adding additional check boxes if the range of products increases, etc. This problem can be partially overcome by defining 'spare' checkboxes, which you hide (.visible = False), and bring into service as necessary.

However a more flexible solution is probably the use of a Combo Box (if you want to simply select one product from many) or a multiselect list box (if you want to select several products from many).

So first advice would be think about the long term, not just what you want to do here and now.

Hope This helps Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I see what you are saying Ken. What I was planning on is having the check boxes reference tables in a union query for diferent types of products. There is a table for additional items, and Misc items for items added in the future. Can I make a check box hidden, and have it be renamed and then be made visable? There will not be many changes to the database, but that might be useful.
Thanks
Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top