multiple entries in form text box
  Home FAQ Contact Sign in
microsoft.public.access.forms only
 
Advanced search
POPULAR GROUPS

more...

microsoft.public.access.forms Profile…
 Up
multiple entries in form text box         


Author: jackie
Date: Apr 10, 2008 11:20

is there a way to populate a text box with more then one search criteria. For
example, could you enter a search for all 50 states, or a group of customers.
I tried uploading multiple rows of data using a csv file, but that didn't
work.
My users would like to enter a set of customers.
8 Comments
RE: multiple entries in form text box         


Author: KARL DEWEY
Date: Apr 10, 2008 11:58

One way is like this --
SELECT YourTable.*, [Forms]![FormName]![TextBox] AS Expr1
FROM ALPHA
WHERE [Forms]![FormName]![TextBox] Like "*" & [YourCustomerField] & "*";

It may give you problems based on how you have your customers loaded.

--
KARL DEWEY
Build a little - Test a little

"jackie" wrote:
> is there a way to populate a text box with more then one search criteria. For
> example, could you enter a search for all 50 states, or a group of customers.
> I tried uploading multiple rows of data using a csv file, but that didn't
> work.
> My users would like to enter a set of customers.
no comments
RE: multiple entries in form text box         


Author: jackie
Date: Apr 14, 2008 04:02

"KARL DEWEY" wrote:
Show full article (0.67Kb)
no comments
RE: multiple entries in form text box         


Author: jackie
Date: Apr 14, 2008 04:04

Hi Karl,
Can you please explain what Expr1 is? And do I actually code 'from alpha' or
do I put in the name of the table.
How should I have the customers loaded to cause the lease amount of trouble.
What about a Csv. file, or selecting from an excel spreadsheet. Thanks.

Jackie

"KARL DEWEY" wrote:
Show full article (0.95Kb)
no comments
RE: multiple entries in form text box         


Author: KARL DEWEY
Date: Apr 14, 2008 09:38

>>Can you please explain what Expr1 is?
When you duplicate a field in a query or do not supply a name for a
calculated field Access gives them a name starting with Expr1.
>>And do I actually code 'from alpha' or do I put in the name of the table.
You edit in your table name in the SQL statement where it says YourTable and
also in place of ALPHA.
>>How should I have the customers loaded to cause the lease amount of trouble.
Your customer would be in the field of your table and replace
YourCustomerField with that field name.

--
KARL DEWEY
Build a little - Test a little

"jackie" wrote:
> Hi Karl,
> Can you please explain what Expr1 is? And do I actually code 'from alpha' or
> do I put in the name of the table.
> How should I have the customers loaded to cause the lease amount of trouble...
Show full article (1.61Kb)
no comments
RE: multiple entries in form text box         


Author: jackie
Date: Apr 14, 2008 10:29

Thanks you.
Here is the code I have entered.

SELECT jan_08_orders_imcom.dodaac, [Forms]![qbf_form]![dodaac] AS Customer
FROM jan_08_orders_imcom
WHERE (([Forms]![qbf_form]![dodaac] Like "*" & [dodaac] & "*")

However, when I enter multiple dodaac numbers in the text box, it returns
all of the rows in the table, with the correct dodaac in the dodaac row, but
the customer row is the first entry entered into the text box. For example,
if I have enter dodaacs:
w334d8
w564J2
there are 15000 rows and all of the customer rows = w334d8.

I'm not sure what I should do next. Thanks.

"KARL DEWEY" wrote:
>>>Can you please explain what Expr1 is?
> When you duplicate a field in a query or do not supply a name for a
> calculated field Access gives them a name starting with Expr1.
>>>And do I actually code...
Show full article (2.32Kb)
no comments
RE: multiple entries in form text box         


Author: KARL DEWEY
Date: Apr 14, 2008 11:31

Then use this --
SELECT jan_08_orders_imcom.dodaac
FROM jan_08_orders_imcom
WHERE (([Forms]![qbf_form]![dodaac] Like "*" & [dodaac] & "*");

--
KARL DEWEY
Build a little - Test a little

"jackie" wrote:
> Thanks you.
> Here is the code I have entered.
>
>
> SELECT jan_08_orders_imcom.dodaac, [Forms]![qbf_form]![dodaac] AS Customer
> FROM jan_08_orders_imcom
> WHERE (([Forms]![qbf_form]![dodaac] Like...
Show full article (2.66Kb)
no comments
RE: multiple entries in form text box         


Author: jackie
Date: Apr 15, 2008 10:55

Hi, Thanks for the help.

I am able to add more then one dodaac to the text box if I enter them myself
and add a comma after each. Your code works. Now I have a different problem,
and I don't know if this is the correct forum.
I converted an excel file with 1700 rows to a .csv but since the file
doesn't have commas, when I copy and paste several of the rows into the
access form textbox, nothing happens.
Is it possible to cut/paste several rows into the textbox, or is it an issue
with the file format.

"KARL DEWEY" wrote:
> Then use this --
> SELECT jan_08_orders_imcom.dodaac
> FROM jan_08_orders_imcom
> WHERE (([Forms]![qbf_form]![dodaac] Like "*" & [dodaac] & "*");
>
> --
> KARL DEWEY
> Build a little - Test a little...
Show full article (3.36Kb)
no comments
RE: multiple entries in form text box         


Author: KARL DEWEY
Date: Apr 15, 2008 11:07

>>when I copy and paste several of the rows into the access form textbox,
nothing happens.
That kind of data belongs in a table.

--
KARL DEWEY
Build a little - Test a little

"jackie" wrote:
> Hi, Thanks for the help.
>
> I am able to add more then one dodaac to the text box if I enter them myself
> and add a comma after each. Your code works. Now I have a different problem,
> and I don't...
Show full article (3.75Kb)
no comments