From: JK jasonk at necoffeeco dot on 31 Mar 2010 15:17 I'm trying to create a chart but I have too man names. I want to limit the query to names that begin with an A through M - then create a separate query for names that begin with M though Z. That way, I can have two reports that display the data properlly. Any idea how I would limit the query data based on the first letter of each person's name? I also need to incorporate the greater than / less than restriction. Thanks,
From: KARL DEWEY on 31 Mar 2010 15:40 Try this -- Between "A" AND "M" -- Build a little, test a little. "JK" wrote: > I'm trying to create a chart but I have too man names. I want to limit the > query to names that begin with an A through M - then create a separate query > for names that begin with M though Z. That way, I can have two reports that > display the data properlly. > > Any idea how I would limit the query data based on the first letter of each > person's name? I also need to incorporate the greater than / less than > restriction. > > Thanks,
From: Jerry Whittle on 31 Mar 2010 15:41 SELECT Employees.* FROM Employees WHERE Left([LastName],1) Like "[A-N]" ; SELECT Employees.* FROM Employees WHERE Left([LastName],1) Like "[M-Z]" ; -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "JK" wrote: > I'm trying to create a chart but I have too man names. I want to limit the > query to names that begin with an A through M - then create a separate query > for names that begin with M though Z. That way, I can have two reports that > display the data properlly. > > Any idea how I would limit the query data based on the first letter of each > person's name? I also need to incorporate the greater than / less than > restriction. > > Thanks,
From: Marshall Barton on 31 Mar 2010 15:56 JK <jasonk at necoffeeco dot com> wrote: >I'm trying to create a chart but I have too man names. I want to limit the >query to names that begin with an A through M - then create a separate query >for names that begin with M though Z. That way, I can have two reports that >display the data properlly. > >Any idea how I would limit the query data based on the first letter of each >person's name? I also need to incorporate the greater than / less than >restriction. Use a criteria like this for the name field: < "N" for the first one and: >= "N" for the second one. -- Marsh MVP [MS Access]
From: John Spencer on 31 Mar 2010 17:37 Use the following expressions in your query as criteria under the name field. For a to m use LIKE "[A-M]*" And for n to z LIKE "[N-Z]*" John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County JK wrote: > I'm trying to create a chart but I have too man names. I want to limit the > query to names that begin with an A through M - then create a separate query > for names that begin with M though Z. That way, I can have two reports that > display the data properlly. > > Any idea how I would limit the query data based on the first letter of each > person's name? I also need to incorporate the greater than / less than > restriction. > > Thanks,
|
Pages: 1 Prev: Time function Next: Can a Table be Updated From a Subquery with Aggregate Count Value? |