Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2008

Tip: Looking for answers? Try searching our database.

multiple entries in form text box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jackie - 10 Apr 2008 19:20 GMT
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.
KARL DEWEY - 10 Apr 2008 19:58 GMT
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.

Signature

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.
jackie - 14 Apr 2008 12:02 GMT
> One way is like this --
> SELECT YourTable.*, [Forms]![FormName]![TextBox] AS Expr1
[quoted text clipped - 8 lines]
> > work.
> > My users would like to enter a set of customers.
jackie - 14 Apr 2008 12:04 GMT
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
[quoted text clipped - 8 lines]
> > work.
> > My users would like to enter a set of customers.
KARL DEWEY - 14 Apr 2008 17:38 GMT
>>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.

Signature

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
[quoted text clipped - 16 lines]
> > > work.
> > > My users would like to enter a set of customers.
jackie - 14 Apr 2008 18:29 GMT
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
[quoted text clipped - 26 lines]
> > > > work.
> > > > My users would like to enter a set of customers.
KARL DEWEY - 14 Apr 2008 19:31 GMT
Then use this --
SELECT jan_08_orders_imcom.dodaac
FROM jan_08_orders_imcom
WHERE (([Forms]![qbf_form]![dodaac] Like "*" & [dodaac] & "*");

Signature

KARL DEWEY
Build a little - Test a little

> Thanks you.
> Here is the code I have entered.
[quoted text clipped - 43 lines]
> > > > > work.
> > > > > My users would like to enter a set of customers.
jackie - 15 Apr 2008 18:55 GMT
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.

> Then use this --
> SELECT jan_08_orders_imcom.dodaac
[quoted text clipped - 48 lines]
> > > > > > work.
> > > > > > My users would like to enter a set of customers.
KARL DEWEY - 15 Apr 2008 19:07 GMT
>>when I copy and paste several of the rows into the access form textbox,
nothing happens.
That kind of data belongs in a table.

Signature

KARL DEWEY
Build a little - Test a little

> Hi, Thanks for the help.
>
[quoted text clipped - 59 lines]
> > > > > > > work.
> > > > > > > My users would like to enter a set of customers.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.