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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unbound Field Text Box Question

Status
Not open for further replies.

jjc3397

Programmer
Dec 21, 2003
55
US
I have a parameter query developed where the user is being asked to enter license types. I want the user to enter license types separated by comma's in a text Box on an unbound field area and then place the types into a parameter query to select data based on these types entered.

For example. A text box appears, user enters
010,020,030,040,070,100,110,120,130,140,150
The user enters numbers in separated by commas.

These numbers are then placed in the parameter query automatically and data is then pulled for all of these types entered in as a button is pushed.

Also, I want to place an edit here too, where if the user tries to enter alphanumeric data in instead of numeric data, a error message will appear.

I am new to Visual Basic. I believe this can be done.

jjc3397
 
How are ya jjc3397 . . .

Well . . . the final result will not be a parameter query, it'll be an a query with properly set criteria.

Use the [blue]Split[/blue] function to seperate the license types into an array. Then loop thru the array and build your criteria . . .

Your thoughts?

Calvin.gif
See Ya! . . . . . .
 
Hi

You must have a highly skilled user base to be this dependable on their typing skills!

Why not use a listbox (multiselect) to build the list? Then loop through the selected values to set the target query's criteria? I think the results would be more dependable.

Using the results will be dependant on the end-output: filter for a report, "permenantly" changing the query, or setting the values of a control. Yes, any of these options are available in VBA

Cheers

S
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top