Criteria Question

*I'm not very knowledgeable with Access*

I want to input a criteria for a query with a range of results, some are all 
numerical and some contain letters. How do I create a range criteria for 
example "11111 to 33333" or "H12345 to H23456"? The only way i have been able 
to do it is very confusing, for instance I use Like 
"[1-3][1-3][1-3][1-3][1-3]", which can produce the results but I'm not sure 
if there is a better input strategy.




0
Utf
6/22/2007 6:53:00 PM
access.queries 6343 articles. 1 followers. Follow

2 Replies
593 Views

Similar Articles

[PageSpeed] 17

You can use Between with Criteria:

Between 11111 and 33333 (if a numeric field)
Between "H12345" and "H23456" (if a text field)

Between is inclusive, so records matching the specific values above would be 
included.
However, be careful when using it with dates. Since Date values also include 
Time, something like
    Between #06/21/06# and #06/21/07#
would exclude records with values greater than 6/21/07 12:00:00 AM.  If time 
values are stored in the data, that probably means the entire day would be 
excluded.

HTH,


"Florida Analyst" <FloridaAnalyst@discussions.microsoft.com> wrote in 
message news:D298847A-64A4-4F3A-8219-ACDF7B9FE721@microsoft.com...
> *I'm not very knowledgeable with Access*
>
> I want to input a criteria for a query with a range of results, some are 
> all
> numerical and some contain letters. How do I create a range criteria for
> example "11111 to 33333" or "H12345 to H23456"? The only way i have been 
> able
> to do it is very confusing, for instance I use Like
> "[1-3][1-3][1-3][1-3][1-3]", which can produce the results but I'm not 
> sure
> if there is a better input strategy.
>
>
>
> 


0
George
6/22/2007 7:31:28 PM
Ok great, I have an access book and it didnt mention that!!!

"George Nicholson" wrote:

> You can use Between with Criteria:
> 
> Between 11111 and 33333 (if a numeric field)
> Between "H12345" and "H23456" (if a text field)
> 
> Between is inclusive, so records matching the specific values above would be 
> included.
> However, be careful when using it with dates. Since Date values also include 
> Time, something like
>     Between #06/21/06# and #06/21/07#
> would exclude records with values greater than 6/21/07 12:00:00 AM.  If time 
> values are stored in the data, that probably means the entire day would be 
> excluded.
> 
> HTH,
> 
> 
> "Florida Analyst" <FloridaAnalyst@discussions.microsoft.com> wrote in 
> message news:D298847A-64A4-4F3A-8219-ACDF7B9FE721@microsoft.com...
> > *I'm not very knowledgeable with Access*
> >
> > I want to input a criteria for a query with a range of results, some are 
> > all
> > numerical and some contain letters. How do I create a range criteria for
> > example "11111 to 33333" or "H12345 to H23456"? The only way i have been 
> > able
> > to do it is very confusing, for instance I use Like
> > "[1-3][1-3][1-3][1-3][1-3]", which can produce the results but I'm not 
> > sure
> > if there is a better input strategy.
> >
> >
> >
> > 
> 
> 
> 
0
Utf
6/22/2007 7:48:01 PM
Reply:

Similar Artilces:

Sumif criteria greater than or less than another cell
SUMIF(A1:A10,>B5,C1:C10) You can see what I'm trying to do. How do I do it? maybe this is what you want =SUMPRODUCT((A1:A10>B5)*(C1:C10)) -- Gary Keramidas Excel 2003 "Don O" <Don O@discussions.microsoft.com> wrote in message news:7AD567CD-0A78-4522-8A24-DFC24E4DC786@microsoft.com... > SUMIF(A1:A10,>B5,C1:C10) > > You can see what I'm trying to do. How do I do it? Try =SUMIF(A1:A10,">" & B5,C1:C10) Since B5 is a cell reference you need to combine the text string ">" with the cell re...

Grouping question
What is the most efficient way to achieve this in excel given a list of numbers in col A from 1 to 70 (assume no repeats), I want column B to reflect a group number such that there are 10 equal groups of 7 so any rank from 1 to 7 would have "1" in Col B, anything from 8 to 14 would have "2" etc The formulas I used are messy and sometimes don't work due to rounding and boundary problems t.i.a I'm sure there are a million ways to do it, but the shortest I can think of is =ROUNDUP(A1/7,0) ken "Lee Harris" <lee.harris4@virgin.net> wrote in messa...

Urgent Question Please Help: Credit Card Setup Problem
We have an urgent question regarding credit card setup/cash receipts/bank rec We understand that in Great Plains when setting up a Credit Card to be used by a Customer, it must be setup as a "Bank Card", not a "Charge Card", in order for the transaction to hit Bank Rec. However, we mistakenly setup all the Credit Cards as "Charge Cards", therefore after posting Credit Card Cash Receipt transactions in Receivables, the transaction does not appear in Bank Rec for us to perform Bank Deposits. Please Please Help!!! Is there any way to "fix" those pos...

date criteria problem 12-19-07
I am trying to create a query that looks for date values that are greater than or equal to a date value on an open form: >=[forms]![counselorreportmenu]![txtbegin] This isn't working. The field on the form is a date format field. What can I do to get this to work? I had a similar problem in code on a form where I was trying to find dates greater than a string date value. Wondering if it is a formatting issue on the returned value...? Thanks in advance! NEVERMIND! I just used DateValue and now it's working. Thanks anyway! "rs0905" wrote: > I am trying to...

MSChart Question
Can an inset MSChart object have 2 different styles of charts - like a target line on a stacked bar chart? Would this require 2 charts, one on top of the other like layered graphics? Does anyone have experience with overlaying charts and the inherent pitfalls. Or, a different solution idea. Thanks! It certainly can. You do, of course, need at least two sets of y-axis data in the recordsource for the chart itself. Then you can select one of the pre-defined mixed chart types from the Custom Types tab in the Chart Type .... dialog (available either from the Chart menu or via the right-clic...

Data Entry Form questions
I have a database with several sheets divided up based on the customers Id#, all the Id# shhets are laid out the same way. The Excel Data Form displays all the columns headings like it should. What I am trying to do is create a data entry form that will place the information on a particular sheet depending on the customer Id# (example: customer Id# is 143 the information would go to sheet1, customer Id# 281 go to sheet2, customer Id# 313 go to sheet3, and so on). Also in some of the columns I have a vlookup formula that looks up the customer Id# on the appointment sheet an...

Schema Import Or Include Question.
what exactly is the difference between import and include? For Example if i had a schema called common, that had some common elements that i use such as address, phone ect. And then i created a schema called customers to keep track of well customers. how would i use the phone element from the common schema in the customers schema? Would I use import or include or both and if so how? Thanks. WStoreyII WStoreyII wrote: > what exactly is the difference between import and include? You can decompose your logical schema for one targetNamespace into several parts and then use <xs...

date format questions.
Hi, I am new at this PS scripts. I want to create a file name with a date component to make the name specific. I want to use the date and time to achive that. How can I get the date and time from a typical date format into a string like: 20100309120754 Thanks. "kingram" <kingram@aspenmas.com> wrote in message news:6a28d812-edc5-42a7-9708-d0b5266bf365@t34g2000prm.googlegroups.com... > Hi, I am new at this PS scripts. > I want to create a file name with a date component to make the name > specific. > I want to use the date and time to achive that. ...

Inventory by location list question?
I have an excel spreadsheet inventory list. Sheet-1 of the spreadsheet contains everything we would want to know about the inventory (what it is, where the item is located, what it was purchased for, sold for, etc). Example of spreadsheet sheet#1 column (field) name/layout across top. Column A = (Item#), Column B = (Category), Column C = (Description), Column D = (DatePurchased), Column E = (Price Purchased), Column F = (Date Sold), Column G = (Sold For), Column H = (Location of item), Column E = (Price Purchased), and Column F = (Date Sold). Rows-3 thru X following (down and across), c...

NEWBIE question
I have a worksheet and I need to ALPHABATIZE this list of names. It was already done, but I had to delete some names and add others. Is there an easy way to do this without having to retype all of these? Sorry if this question seems silly but I have no idea how to use excel. This worksheet was already done and given to me. Thanks, Missy Hi Missy you can try the following: 1. Add a helper column adjacent to your text column (assumption: A is your text column and B your helper column) 2. In B1 insert the following formula: =UPPER(A1) copy this down for all rows 3. Highlich column B and ...

dst questions sorry, alot of posts
Hi, running 2 exchange servers. Exchange 2003 sp2 (what is the build for sp2?), Event viewer has it at 7638 build. Both exchange servers are running 2003 sp1 with KB931836 patch for dst I hear of all the problems occuring with KB926666, is there a new patch for exchange??? Please help... DST is driving me crazy. Also, is there DST list, we have a few NT, 2000 Servers. I have to use the TMZedit tool. Thank you very much, Koz The only issue with 926666 (afaik) is with the Store not mounting under certain conditions in environments with more than one domains where you've u...

Time comparison question
When I run the code below in the OnTimer() method (with a 1 second timer), the TRACE results at lines 13 and 17 is always the same. I always have the same year, month, day, hour, minute, and second (note that second is always 0). However, the TRACE results at lines 21 and 22 is not always the same. Most of the times both values are different. Here is an example of the values: currentTime.m_dt = 3.78627673611111170000e+004 time2.m_dt = 3.78627673611111090000e+004 For this example, the TRACE result at line 27 is: 7.275958e-012 What I want is to compare 'time2' wit...

Date question
Is there a simple formula that will give the difference between two dates in MONTHS? Today() - (6-1-2003) = MONTHS Try this... A1 = 6/1/2003 =DATEDIF(A1,NOW(),"m") -- Biff Microsoft Excel MVP "Ziggy" <ziggy943@xmission.com> wrote in message news:40762e16-9a39-4906-8630-c1ffc5ed1e4d@i25g2000yqm.googlegroups.com... > Is there a simple formula that will give the difference between two > dates in MONTHS? > > Today() - (6-1-2003) = MONTHS On Apr 16, 2:44=A0pm, "T. Valko" <biffinp...@comcast.net> wrote: > T...

Shared workbook question
I have an Excel workbook that is shared among many users inside a intranet. When I look at the list which shows the users using the workbook, ther are users listed which actually -don't- have the workbook open Sometimes users are even listed twice. By using the button in the dialog window I can remove the users, bu why do the users remain on the list when they don't have the workboo open -- Message posted from http://www.ExcelForum.com Hi IMHO the shared workbook feature of Excel is a little bit buggy (one of the reasons I would recommend NOT to use it) -- Regards Frank Kabel Fra...

address space question
Hi, Let's say I have created 3 virtual smtp connectors in my Exchange 2003 site as follow: Name Address Space Cost IMC1 *internal.com 10 IMC2 * 10 IMC3 * 100 All IMCs are pointing to different smarthosts. if all IMC are in running state, will message sent to internal.com also route to IMC2 (or like round-robin) ? Thanks! regards, Mike The use of internal.com as a specific domain on IMC1 should cause that to be favored for that doma...

Canadian Edition Installation setup Questions 2006
I had money 2004 Canadian version. that I had tried to use. But it would only give me a listing of American Banks, no Canadian Banks were listed. Before I go and purchase money 06 I want to be sure that my canadian banks are available, were can I find out what cdn banks are available for transaction d/l. Is there any special setup settings I have to have before installation You need to have Control Panel > Regional Settings as English (Canadian). -- Regards Bob Peel, Microsoft MVP - Money For UK tips & fixes see http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny. Fo...

color cells when criteria is met
Can i color a cell in Excel when the criteria is met. e.g. when a value is -1 i want to color it red automatically. Cor Format>conditional formatting, cell value is Regards, Peo Sjoblom "Cor" <Cor@discussions.microsoft.com> wrote in message news:50CAC529-95E3-4F76-913F-5A012A602F33@microsoft.com... > Can i color a cell in Excel when the criteria is met. > e.g. when a value is -1 i want to color it red automatically. > > Cor Cor In Excel 97 up, check out conditional formatting Format>Conditional Formatting 'Cell Value is' 'equal to' -...

Newbie question: Publication size
Hi all, Somehow I cannot create the size of the publication: 1- I want to have it A3, but it insists on using an a4 form even after I change the paper size to a3 in page setup. 2- Even when using A4, there is a blue rectangle that confines the size of the publication. Thanks for the help, On Fri, 6 Jan 2006 17:55:46 +0000, Veli Izzet wrote (in article <eVlhbquEGHA.208@tk2msftngp13.phx.gbl>): > Hi all, > > Somehow I cannot create the size of the publication: > > 1- I want to have it A3, but it insists on using an a4 form even after I > change the paper size to...

Word 2007 Page Margin Question
Word 2007, Where is the option in Page setup - THIS PAGE ONLY I want different page setup for different pages, but in 2007 version, I dont see it. -- jnathan Margin settings are attributes of Sections, not of pages (and it has been that way in all versions of Word). Therefore, if you want to vary the margin settings, you will need to separate the pages with next page Section Breaks. It is however possible to have a different Odd and Even page layout which can be set via the Layout tab of the Page Setup dialog and also you can achieve a different first page (o...

How to get rid of pop-up question boxes (form fields) in Word 2007
I am creating a template for Word 2007 based on a customized Word 2003 template. When I double-click the .dotx file to open a new file based on the template, I get several boxes asking me for document name, etc. (These were pertinent to the 2003 template but are no longer needed.) Are these form fields? How do I delete them? I have the Developer tab enabled and have looked in the Controls group but can't figure out how to get rid of existing form fields. Thanks, FinnLisa Please see replies in your previous thread on this subject. -- Suzanne S. Barnhill Microsoft MV...

Question: sharing exchange calendars
Sharing exchange calendars outside of the local domain Is it possible (and if so how) to share calendars in exchange from one local.domain to another remote domain? I have a domain abc.local and I would like to share calendars with people in a domain from another company called xyz.local. I was thinking that they had to be part of the same organization somehow but what if that isn't possible. Is there a way to do this? Can someone email me or reply to this post as i need help with this ASAP. My Email: backup (at) yahoo (dot) com. Thank you. My first thougt is Public Fo...

Question on IMPLEMENT_DYNCREATE In Multiple Inheritance Case
Suppose I have an MDI project. The wizard automatically placed my document object implementation file with: IMPLEMENT_DYNCREATE(CCatchbugDoc, CDocument) If I wish to have my document object to have multiple inheritance (CDocument and another non-CObject object, which is created by hand), do I need to add any new stuff under IMPLEMENT_DYNCREATE macro? Thanks No. And good luck on the multiple inheritance. Figure if it works, it is a miracle. joe On 25 Jun 2005 22:43:48 -0700, yccheok@gmail.com wrote: >Suppose I have an MDI project. > >The wizard automatically placed my docu...

Question regarding MS Exchange 2003 Bkup
What is the best method of backup if I want to restore individual e-mails. I'm currently backing up both the information store and mailboxes using BackupExec 9.1 and the backup is taking a very long time. Do I need the backup both? Dennic, You should always backup the information store. You need the store backup in the event something happens. If time is an issue I would adjust how often you backup the individual mailbox's. Backing up individual mbx's is a convenience so you can easily restore an individual mbx. Thanks, Chad "DennisC" wrote: > What is ...

Simple File IO Question
Just a question, I have noticed in my applications that when you try to read a file that doesn't exist, this bombs your application. Of course I could just write an error handler for the issue but instead in alot of my applications if it doesn't exist I just want to create it. So I usually end up with code like this: if(!File.Exists("data.dat")) File.Create("data.dat") StreamReader sr = new StreamReader("data.dat"); // insert relevant code here sr.Close(); The issue is that when the program gets to the StreamReader instantiation it then ...

Clearification question
Hi, We have been trying to figure this out for some time now. Occasionly when we schedule services out from the WEB client, the appointment occurs in the users Outlook client/calendar. But most of the time it doesn't. And when it does it is always the same user, never anyone else. All of our consultants have the same rights and roles. I have been trying to figure this one out - but i can't...; Does the Service Calendar sync with Exchange / Outlook or not? If someone who knows this could clearify, i would really appreciate it. Regards From what I've seen...and we use th...