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 / July 2007

Tip: Looking for answers? Try searching our database.

Use a Text Box to query a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Skip - 05 Jul 2007 21:00 GMT
I've built a form based on a query.  I want to use that form to query for
multiple records (literally hundreds sometimes) for viewing and output to a
report.  I prefer to have the user type in the values as opposed to selecting
them from a list.  The list would be TOO long.

Thanks
Signature

Skip_GA

Beetle - 05 Jul 2007 22:08 GMT
Based on the info you provided, it sounds like you woul be better off using a
combo box with a query as it's row source. Even though the initial list might
be very long, as soon as your users start entering data in the combo box it
will automatically move to records that match what they have started typing

> I've built a form based on a query.  I want to use that form to query for
> multiple records (literally hundreds sometimes) for viewing and output to a
> report.  I prefer to have the user type in the values as opposed to selecting
> them from a list.  The list would be TOO long.
>
> Thanks
Skip - 06 Jul 2007 14:10 GMT
Thanks Beetle.
I had already tried that.  With that I get a list and that's not what I
want.  I want a text box where you can copy and paste the search criteria,
e.g., 153004 or 165000 or 20001 or ....etc.  Selecting from a list is too,
too laborious with several thousand part numbers.
Signature

Skip_GA

> Based on the info you provided, it sounds like you woul be better off using a
> combo box with a query as it's row source. Even though the initial list might
[quoted text clipped - 7 lines]
> >
> > Thanks
John W. Vinson - 07 Jul 2007 02:06 GMT
>Thanks Beetle.
>I had already tried that.  With that I get a list and that's not what I
>want.  I want a text box where you can copy and paste the search criteria,
>e.g., 153004 or 165000 or 20001 or ....etc.  Selecting from a list is too,
>too laborious with several thousand part numbers.

And typing scores of five or six digit numbers *isn't*!?

Where would the list values come from?

To do this using a textbox you will need to have VBA code to extract the list
of values (I'd suggest as comma separated text if possible) and construct the
SQL of a query using the IN() syntax:

WHERE PartNo IN("153004", "165000", "20001", ...)

This can't be done easily using a parameter query.

            John W. Vinson [MVP]
Skip - 10 Jul 2007 21:52 GMT
Thanks John,  tha's probably the easier way to address the need.  I finally
ended up setting up an empty table that I joined to the query and then built
a macro to transfer the text from the text file to the table and query the
database.  It works, just might not be the most efficient way to do it.
Signature

Skip_GA

> >Thanks Beetle.
> >I had already tried that.  With that I get a list and that's not what I
[quoted text clipped - 15 lines]
>
>              John W. Vinson [MVP]
John W. Vinson - 10 Jul 2007 23:35 GMT
>Thanks John,  tha's probably the easier way to address the need.  I finally
>ended up setting up an empty table that I joined to the query and then built
>a macro to transfer the text from the text file to the table and query the
>database.  It works, just might not be the most efficient way to do it.

If the table is properly indexed, that may indeed be the best way! If it's
working for you, go with it.

            John W. Vinson [MVP]
 
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



©2009 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.