multiple entries in form text box

  • Thread starter Thread starter jackie
  • Start date Start date
J

jackie

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.
 
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 said:
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 said:
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.
 
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 said:
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 said:
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.
 
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.You edit in your table name in the SQL statement where it says YourTable and
also in place of ALPHA.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 said:
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 said:
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 said:
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.
 
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 said:
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.You edit in your table name in the SQL statement where it says YourTable and
also in place of ALPHA.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 said:
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 said:
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


:

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.
 
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 said:
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 said:
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 said:
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

:

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


:

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.
 
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 said:
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 said:
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 said:
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


:

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

:

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


:

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.
 
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 said:
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 said:
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 said:
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.



:

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


:

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

:

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


:

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top