Wildcard on a numeric field (1 Viewer)

tcaprice

Registered User.
Local time
Today, 12:00
Joined
Mar 28, 2001
Messages
21
Hi,

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.

Tom
 

cheuschober

Muse of Fire
Local time
Today, 07:00
Joined
Oct 25, 2004
Messages
168
~

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.

Regards,
~chad
 

tcaprice

Registered User.
Local time
Today, 12:00
Joined
Mar 28, 2001
Messages
21
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?
 

Users who are viewing this thread

Top Bottom