473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Like and Access

Hello,

I have a postal code field, when I run the query to ask the user which
postal code want to view.

I need to use like now, so if If the user wants all the postal codes
which begins in 17, Selec * from PostalCodes where "[PostalCode]*"
doesn´t work, what is the way to do it in access.

Thanks for your replies.
Jul 31 '06 #1
2 1749

Arturo Guzman wrote:
Hello,

I have a postal code field, when I run the query to ask the user which
postal code want to view.

I need to use like now, so if If the user wants all the postal codes
which begins in 17, Selec * from PostalCodes where "[PostalCode]*"
doesn´t work, what is the way to do it in access.

Thanks for your replies.
Hi Arturo

This is the correct way of writing the like with a wildcard:

SELECT PostCode
FROM tblPostCode
WHERE ((PostCode) Like "17*")

Good luck

Nick

Jul 31 '06 #2
On Mon, 31 Jul 2006 20:36:57 +0200, Arturo Guzman wrote:
Hello,

I have a postal code field, when I run the query to ask the user which
postal code want to view.

I need to use like now, so if If the user wants all the postal codes
which begins in 17, Selec * from PostalCodes where "[PostalCode]*"
doesn´t work, what is the way to do it in access.

Thanks for your replies.
I'm sure you wish the user to be able to change the postal code
whenever he wants without modifying the query.

Select YourTable.* from YourTable where [PostalCodeField] Like [Enter
Start of code] & "*"

The user will be prompted of for the beginning of the code.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jul 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: SkunkDave | last post by:
Having this description column in a table "Cookies, peanut butter sandwich, regular" When using this WHERE clause: WHERE (((Food_Data.Description) Like "*Butter*" & "*Peanut*")); I...
2
by: Rigid Kitten | last post by:
I cannot figure out how to: 1. call an Access query from C# and consume the recordset, where the query uses a user defined function. for example select rowid, GetBreedOfCat() from tblCats; ...
0
by: Jason Heyes | last post by:
I wrote a previous post that asked whether there was a reference-counted implementation of std::vector. Apparantly there wasn't. So my next question is, is it possible to write your own shared...
2
by: bissatch | last post by:
I am trying to compare two variable but using regular expression: $access = "glasgow" $areaid = "glasgow-westend-byers_rd" using the two variables, I would like the areaid variable to be...
3
by: Joerg Glissmann | last post by:
Hi there, is there a way to link an Access XP database to a query in a different database (Access XP as well) like you can do with tables? My front ends need to operate on different data...
3
by: Pete | last post by:
Is there any possiblity of writing an Access or Visual Basic application that provides a method of sharing the window focus between Access and the Shell application? i.e....
2
by: Michael C | last post by:
Hi all. When I run the following query against my Access database - from within Access - it returns the correct results (5 records in this instance): SELECT * FROM WHERE = "Clothes" AND LIKE...
5
by: Takeadoe | last post by:
Gang - I'm generating date and time variables from scanned forms. Currently, the date and time values are as follows: 06/26/2006 and 11:30 AM. I've written VBA code to combine them into a...
8
by: Roland Hall | last post by:
In Access you use "*" + + "*", + can be replaced with & Calling a parameterized query in Access requires % be used in place of *, however, all that I have read show dynamic SQL passed to Access: ...
30
by: Adam Baker | last post by:
Hello, I'm writing a site where a handful of people will be able to edit the content using PHP scripts (FCKeditor). The content is stored as individual files in a directory. I'd like to validate...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.