Fill in the Balnks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a databasse table in which I have to automatically fill in the blanks
of a field with data from the same field previous record.
Example, I need the results showing the days to read like this:

13 2006121 WALLACE LM Saturday P0-05 05200: 004.01
15 2006121 WALLACE LM Saturday BT 27-May-06 3.16
16 2006121 WALLACE LM Saturday ET 27-May-06 7.17
17 2006121 WALLACE LM Monday P0-05 05200: 004.46
19 2006121 WALLACE LM Monday BT 29-May-06 2.07
20 2006121 WALLACE LM Monday ET 29-May-06 6.53
21 2006121 WALLACE LM Tuesday P0-05 05200: 004.24
23 2006121 WALLACE LM Tuesday BT 30-May-06 2.19
24 2006121 WALLACE LM Tuesday ET 30-May-06 6.43
25 2006121 WALLACE LM Wednesday P0-05 05200: 003.99
27 2006121 WALLACE LM Wednesday P0-05
06200: 000.01

From a table showing the days only once as shown below:

ID YrPPWk Name Day Operation Date Time
13 2006121 WALLACE LM Saturday P0-05 05200: 004.01
15 2006121 WALLACE LM BT 27-May-06 3.16
16 2006121 WALLACE LM ET 27-May-06 7.17
17 2006121 WALLACE LM Monday P0-05 05200: 004.46
19 2006121 WALLACE LM BT 29-May-06 2.07
20 2006121 WALLACE LM ET 29-May-06 6.53
21 2006121 WALLACE LM Tuesday P0-05 05200: 004.24
23 2006121 WALLACE LM BT 30-May-06 2.19
24 2006121 WALLACE LM ET 30-May-06 6.43
25 2006121 WALLACE LM Wednesday P0-05 05200: 003.99
27 2006121 WALLACE LM Wednesday P0-05 06200: 000.01
Understand the talbe is about 12000 records long.

TY
 
I'm confused. If you have a valid date field, why do you also have a field
that stores the day of the week? That is redundant. Get rid of the day
field.

In your reports, queries, and forms, you can pull the day of week from the
date and print/display it. There is no need to store it.
 
Upon looking again, I can't really see where your data starts and stops.
What are your field names and the data in them?

It looks like you have ID, YRPPWK, NAME, DAY, OPERATION, DATE, TIME.
In the line that does include the day, I don't see a date. It looks like
two different formats of data being shoved in one table.

FYI, "date" and "time" are reserved words. I'd rename these fields if I
were you. I think that "name" might be a reserved word as well.
 
As you can see this table involves begin tour and end tour of employees. the
probelm begins when an employee clocks in before the midnight hour and clocks
out thee next day. I am basically trying to compute total hours worked per
day per employee. I normally used the date field as the primary key to
subtract the BT from the Et. But a problem occurs when the dates are
different. I had my program running using the YrPPWk, Name and date as the
key felds to computate the total hours. But when the is a midnight crossover
the dates are applicable. I need to change to days as a primary field but
first I have to fill in the blanks.

ty




ID YrPPWk Name Day Operation Date Time
13 2006121 WALLACE LM Saturday P0-05 05200: 004.01
15 2006121 WALLACE LM BT 27-May-06 11.00
16 2006121 WALLACE LM ET 28-May-06 7.17
17 2006121 WALLACE LM Monday P0-05 05200: 004.46
19 2006121 WALLACE LM BT 29-May-06 2.07
20 2006121 WALLACE LM ET 29-May-06 6.53
21 2006121 WALLACE LM Tuesday P0-05 05200: 004.24
23 2006121 WALLACE LM BT 30-May-06 2.19
24 2006121 WALLACE LM ET 30-May-06 6.43
 
Back
Top