473,468 Members | 1,906 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Search a record similar to LIKE function?

33 New Member
Hi All,

I would like to retreive all the records that starts, where the field CompanyName in table tblJob start with "sap*"... i assume this can be acheived by using LIKE function in query design but i want the user to enter the text.

Say, there are two company Names like "sapin" and "sapeen"

when the user enters the text as "sap", it should list all the records where the company name starts with Sap..

and again, if the user enters, "ABC", i want access to list all records where the company name starts with ABC.

Any help in this regard.

thanks,
Kathy
Jul 23 '07 #1
4 2565
kepston
97 Recognized Expert New Member
Hi All,

I would like to retreive all the records that starts, where the field CompanyName in table tblJob start with "sap*"... i assume this can be acheived by using LIKE function in query design but i want the user to enter the text.

Say, there are two company Names like "sapin" and "sapeen"

when the user enters the text as "sap", it should list all the records where the company name starts with Sap..

and again, if the user enters, "ABC", i want access to list all records where the company name starts with ABC.

Any help in this regard.

thanks,
Kathy
You can use a parameter query. Access will prompt for an unrecognised field name.
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM tblJob 
  3. WHERE CompanyName Like [Prompt for beginning of company name] & '*';
Jul 23 '07 #2
abolos
65 New Member
Hi All,

I would like to retreive all the records that starts, where the field CompanyName in table tblJob start with "sap*"... i assume this can be acheived by using LIKE function in query design but i want the user to enter the text.

Say, there are two company Names like "sapin" and "sapeen"

when the user enters the text as "sap", it should list all the records where the company name starts with Sap..

and again, if the user enters, "ABC", i want access to list all records where the company name starts with ABC.

Any help in this regard.

thanks,
Kathy
Open a query and in Criteria write:

Like text0 & "*"
Jul 23 '07 #3
kathnicole
33 New Member
Thanks a lot. i was surprised to see the result.

it works good.

thanks n regards,
Kathy
Jul 23 '07 #4
kepston
97 Recognized Expert New Member
Thanks a lot. i was surprised to see the result.

it works good.

thanks n regards,
Kathy
Always glad to help.
Jul 24 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: CharitiesOnline | last post by:
Hello, I have set this script up to add paging to a search results page. Which on the first page works fine. I calculates how many pages there should be depending on the number of results returned...
17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
4
by: kimimaro | last post by:
Thank you for your help I think I know what the problem is. Firstly the add_record cannot read the record.txt or something if the record.txt (in which I used it to store the details of each record)...
3
by: bluez | last post by:
I want to design a webpage where user can search the data from the database and list out the related records. Each of the record got a delete button which allow user to delete the record. ...
15
by: ritesh | last post by:
Hi, I'm working on a piece of code that - 1. has a list of text files 2. and needs to search for a particular expression in these files (this is being done on Linux using gcc 3.4.2) ...
5
by: Deano | last post by:
Perhaps this has been asked before but there might be some up to date thinking about this. I really need a better search function for my asset register. I allow assets to be entered and tracked...
1
by: gautam89 | last post by:
Hi everyone... I'm a high school student working on an Access project for a summer internship. I needed your assistance in writing a criteria for a select query. Table1 has the following...
1
by: DeZZar | last post by:
For anyone that has the 'pleasure' of using Office 2007 you will know of one handy feature built in - its the search function housed in the record selector bar at the bottom of a form that allows...
2
by: woodey2002 | last post by:
Hi Guys and thanks for your time. I have a search form for my database that allows users to select multiple criteria from multi select list boxes. I successfully integrated a multi select...
6
by: woodey2002 | last post by:
Hi Everyone. Thanks for your time. I am trying to create a search form that will allow users to select criteria from multiple multi select boxes. So far i have managed to achieve a search option...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.