Go Back   Access World Forums > Microsoft Access Discussion > Queries

Thread Tools Rate Thread Display Modes
Old 06-28-2005, 01:50 PM   #1
Registered User
Join Date: Mar 2001
Location: sicklerville,NJ,USA
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Wildcard on a numeric field


I have a query that prompts with a parameter box for the field Contributor_ID. Contributor_ID is a numeric field & Key and I use it to allow the user to print a report based on which Contributor_ID value the user enters. This works fine. However, I would like the user to have the option to enter * and then have the report include ALL the contributor IDs. I have done this before on a text field without a problem, however is this not possible on a numeric field as it is not working? I'm trying not to have another version for the ALL option.

If this is not possible, are there any alternatives?

Thank you in advance.


tcaprice is offline   Reply With Quote
Old 06-28-2005, 02:11 PM   #2
Muse of Fire
Join Date: Oct 2004
Location: New York City
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
cheuschober is on a distinguished road
Send a message via ICQ to cheuschober

Why not just create a simple form with a text or combobox and a command button.

In the textbox your user enters your equivalent of Contributor_ID including your * or whatever other 'catchall' you want. in the OnClick() event of your command button, then, you write a Select... Case... statement that checks for your 'catchall' value in one case, and accepts a 'Contributor_ID' in the other case.

DoCmd.RunSql can emulate your query performance at that point.

For a nice simple reference for SQL integration into VBA you can search here or on Martin Green's Access Tips site.

cheuschober is offline   Reply With Quote
Old 06-29-2005, 04:47 AM   #3
Registered User
Join Date: Mar 2001
Location: sicklerville,NJ,USA
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
thanks for the tip Chad, I'll take a shot at it. It sounds like more than I've done up to now but I'll give it a try. I guess there is no such thing as a wild card for a numeric field?

tcaprice is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
using check boxes to return numeric values to a single field rlambkin Forms 2 07-06-2003 08:25 AM
Leading Zeros in Numeric Field tomc Tables 6 06-21-2003 01:10 PM
suma field and move to different named field in different table holly Queries 0 03-23-2002 04:29 PM
[SOLVED] Numeric Field Overflow rebekahraine Queries 0 03-20-2002 10:59 AM
Extracting a text field into 2 numeric ones Mr.D Modules & VBA 1 04-10-2000 05:16 AM

All times are GMT -8. The time now is 10:13 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World