473,420 Members | 4,459 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,420 software developers and data experts.

Hoping someone can help with Query approach

Hi -

I posted this earlier and didn't get any response. Hopefully someone
can help??

I have a table keeping track of employees' jobs in a location. So,
Store #1 Manager #353, AsstMgr #556
Store #2 Manager #776, AsstMgr #132
etc.

The table is
Date StoreNum MgrNum AsstMgrNum ...
Each time a "line up" is recorded, we put in the new date (as people
come and go, for example)
I am trying to figure out how to write a query to get the "Line Up"
for all the stores.

I want the user to enter a date, and have the query return ONE record
per store, and the date on that ONE record is equal to the date the
user enters on the form, OR the nearest date prior to the date the
user enters.
So, the user could enter "1/1/2008" and get the most recent record
for
each location.
I can't get a query to do this! I have records for store 2 for 9/9/06
and 8/17/07 and I just want the 8/17/07 record and I don't have it.
Probably easy, but I'm stumped. I've tried "Max Records" but that
doesn't return the max by store.
SELECT tblLineUp.LineUpDate, tblLineUp.StoreNum
FROM tblLineUp
WHERE (((tblLineUp.LineUpDate)<=[Forms]![frmLineUpAndPhone]!
[txtLineUpDate]));
THEN I want to print these results on a report (I'll look up the
numbers and get the name). I have NO idea how to do that. What I
want is:
Store 1 Store 2.....
Mgr Joe Ken
Asst Mgr Sue John

Do I need a crosstab, or a crosstab for each "job" (manager,
assistant,
Sporting Goods, Clothing, etc.?) to get the person in the job in each
location?

Any and all help is apprecitated.
Sara

Aug 22 '07 #1
0 1179

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

Similar topics

3
by: PiGei | last post by:
Hi all, I'm trying to build a function that - providing the dbname and the query name - show the results. I don't know how to solve this problem... when I try to insert the variable into this...
9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
1
by: Brad Hehe | last post by:
I am attempting to use XPath to query for a specific node in the sample XML I've provided below. I'm unsure of the exact XPath syntax, but I believe I need the following query to get the proper...
6
by: John Baker | last post by:
Hi: As those who have looked at this newsgroup recently will realize, I am a neophyte with Access, although I have experienced with Approach (the Lotus product). There are things I could easily...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
3
by: MattB | last post by:
Not sure if this is a good approach or not, but I'd like to hear some informed opinions. I've designed an ECommerce site that interfaces with my company's POS system. I'm trying to make it as...
17
by: Liam.M | last post by:
Hey guys, Forgive me if my question my be alittle silly, but I would very much appreciate and assistance that could be given! My situation is as follows: I have created a Button, and set...
16
by: Rex | last post by:
Hi All - I have a question that I think MIGHT be of interest to a number of us developers. I am somewhat new to VIsual Studio 2005 but not new to VB. I am looking for ideas about quick and...
118
by: Chuck Cheeze | last post by:
This might be in the wrong group, but... Here is an example of my data: entry_id cat_id 1 20 2 25 3 30 4 25 5 35
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...

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.