Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Access 2010 query parameters

08 Nov 2011   #1
CosmicJest

Windows 7 Pro 64-bit
 
 
Access 2010 query parameters

Hello,

How do I include a portion of a field in a query parameter?

For example, if one record's data in the field I'm querying is, say, "RPMX-1011" and another record's data is, say, "CO-0852", how do I tell the query I want all records that have "PM" appearing somewhere in the field?


My System SpecsSystem Spec
.
08 Nov 2011   #2
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

select * from tablename where fieldname like "*PM*"
My System SpecsSystem Spec
08 Nov 2011   #3
Big Tom

Windows 7 Professional x64
 
 

Quote   Quote: Originally Posted by Kaktussoft View Post
select * from tablename where fieldname like "*PM*"
i agree
My System SpecsSystem Spec
.

08 Nov 2011   #4
CosmicJest

Windows 7 Pro 64-bit
 
 

I'm sorry - it's clear to you two, but not to me. When you say "select * from tablename", does that mean I drag the * into my query? And what does "where fieldname like "*PM*" mean? Do I type "like "*PM*"" somewhere? I'm not getting the results I need.
My System SpecsSystem Spec
08 Nov 2011   #5
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

You're making a query using fields drag and drop? Then make the query as complete as you can. Can you make a parameter query? for example can you make a query that displays the birthday and name but only of the persons with name "Johnson"? I don't know your skills so don't know who to explain
My System SpecsSystem Spec
09 Nov 2011   #6
CosmicJest

Windows 7 Pro 64-bit
 
 

Well, the query already exists (I've been using it for some time even tho it doesn't give me fully accurate results), so I opened it and changed to Design view so I can edit it. From there, I dragged the * from the available fields in the table I'm using into the query. Yes, I believe I could do a query for all people named Johnson with a certain birthdate.
My System SpecsSystem Spec
09 Nov 2011   #7
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

Make the query as good as possible. After that change to sql view. Post sql statement here please.
My System SpecsSystem Spec
09 Nov 2011   #8
CosmicJest

Windows 7 Pro 64-bit
 
 

SELECT [Business Licenses].[Lic#], [Business Licenses].BusinessName, [Business Licenses].FName, [Business Licenses].LName, [Business Licenses].MailAddr, [Business Licenses].City, [Business Licenses].State, [Business Licenses].Zip, [Business Licenses].BsPh
FROM [Business Licenses]
WHERE ((([Business Licenses].[Lic#]) Like "*PM*") AND (([Business Licenses].TypeOfBs)="property management"));
My System SpecsSystem Spec
09 Nov 2011   #9
Kaktussoft

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
 
 

your query is right!
It displays all fields listed after select. But only for those records where TypeOfBs="property management" and Lic# like "*PM*"

what's the problem????
My System SpecsSystem Spec
09 Nov 2011   #10
CosmicJest

Windows 7 Pro 64-bit
 
 

The problem is there are some licenses that have "PM" as part of their license number that are not being included in the query results. Perhaps it's because there is also other text in the "property management" field?
My System SpecsSystem Spec
Reply

 Access 2010 query parameters




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Office 2010 Calendar series/item query
In Office 2003, users were able to change the colour of an individual Calendar entry which was within a series. As far as I can see Office 2010 does not allow this. Does anyone have any ideas? Thanks.
Microsoft Office
Access 2003/2010 fix.
I have a corrupted mdb access file 61Mbytes. There seems to be many paid for programme 'fixes' around that will repair and extract the data, I can do that. BUT I cannot see a program that will actually REPAIR the database so you can double click it and get the original programme to work. Anyone...
Microsoft Office
Access 2010 - Reports...
Hello all, I've searched and searched on the forums and on the web, but I have not found a solution to this possibly very trivial problem (or annoyance?). At work, I've had to create a Report on attendance to a meeting, and another one on those who give their apologies. E.g. On table ...
Microsoft Office
Any problems using Access 2007 database with Access 2010?
According to what I've read, Access 2010 uses the same database format as Access 2007. So this should mean I can open and run a 2007 database (with a lot of VBA code) in Access 2010 with no trouble, yes? So why do I have the feeling that something is not going to work? Is it because I have...
Microsoft Office
access 2010 autonumber
hey there, for my work i need to create a database which will be filled with agreements we make with supliers. Now i want to make an autonumbering which looks like this "SLA0001". Is there a way for that? hope to hear from you soon DD
Microsoft Office
Access 2010
I hope this is not a stupid question guys but why does Access 2010 open a blank database with 2007?
Microsoft Office


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:57.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App