How to only start with the employee In. / remove the Out if it's f

Hello. I'm creating a querie that lists all employee activity. So the querie 
runs onver a table that has all In and Out of the employees registries. 
Sometimes in the the first day is Out, it happens because the employee 
forgets to register is Out of job. So, is it possible to remove that register 
in order to have the first register of the day has a IN? Even better was 
changing the date of that Out register to the previous date.

This is ok to happen because the door don't open if the empoyee don't make 
all register regular. So in the new day if a Out is no detected on the system 
is like the employee never Out. So before he can In he must register Out. :)

Imagine that I have this:
---------------------------------------------------------------------------------
Employe No.             Date                Time             Description
1010                   15-05-2007         08:00              OUT
1010                   15-05-2007         08:01              IN
1010                   15-05-2007         18:00              Out

and I need this:
--------------------------------------------------------------------------
Employe No.             Date                Time             Description
1010                   15-05-2007         08:01              IN
1010                   15-05-2007         18:00              Out



This error hapens when the software detects this:
------------------------------------------------------------------------
Employe No.             Date                Time             Description
1010                   14-05-2007         08:01              IN

This means that in 15th May the employee must register the Out to be able to 
In.

Any idea? Please help.

Regards,
Marco


0
Utf
5/26/2007 12:06:00 AM
access.queries 6343 articles. 1 followers. Follow

11 Replies
668 Views

Similar Articles

[PageSpeed] 38

Hi Marco

My examples below use a table name of tblRegister with columns of 
EmployeeNo, RegDate, RegTime and Description.

Obviously, change these to your own. It is not recommended to use table or 
column names with spaces or to use reserved words like date or time.

Make a backup of your table BEFORE trying these!

If you want to delete the rows use something like, 

delete * from tblRegister
where Description = "OUT"
and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
" and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))

If you want to update them...

update tblRegister
set RegDate = dateadd("d", -1, RegDate), RegTime = "23:59"
where Description = "OUT"
and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
" and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))

Note: I used a time of 23:59 as we don't know the real time they left and, 
presumably, we want it to be after any other times registered. You can change 
this and / or make the query calculate a time if you need to.

And the date gets set to the day before but you might need to do a bit more 
here if yesterday wasn't the last day they were in.

Also, the above work for all dates in the table - you may want to restrict 
it to today or the latest.

Hope this helps

Regards

Andy Hull


"Marco" wrote:

> Hello. I'm creating a querie that lists all employee activity. So the querie 
> runs onver a table that has all In and Out of the employees registries. 
> Sometimes in the the first day is Out, it happens because the employee 
> forgets to register is Out of job. So, is it possible to remove that register 
> in order to have the first register of the day has a IN? Even better was 
> changing the date of that Out register to the previous date.
> 
> This is ok to happen because the door don't open if the empoyee don't make 
> all register regular. So in the new day if a Out is no detected on the system 
> is like the employee never Out. So before he can In he must register Out. :)
> 
> Imagine that I have this:
> ---------------------------------------------------------------------------------
> Employe No.             Date                Time             Description
> 1010                   15-05-2007         08:00              OUT
> 1010                   15-05-2007         08:01              IN
> 1010                   15-05-2007         18:00              Out
> 
> and I need this:
> --------------------------------------------------------------------------
> Employe No.             Date                Time             Description
> 1010                   15-05-2007         08:01              IN
> 1010                   15-05-2007         18:00              Out
> 
> 
> 
> This error hapens when the software detects this:
> ------------------------------------------------------------------------
> Employe No.             Date                Time             Description
> 1010                   14-05-2007         08:01              IN
> 
> This means that in 15th May the employee must register the Out to be able to 
> In.
> 
> Any idea? Please help.
> 
> Regards,
> Marco
> 
> 
0
Utf
5/26/2007 6:01:01 PM
Hi. Very kind from you. Thanks.

I will try and then I let you know. If something goes wrong can I came here 
with again?

By the way. the discription of the OUT can be diferent? Such as "AUTO OUT" 

Once again thanks. 

King regards,
Marco








"Andy Hull" wrote:

> Hi Marco
> 
> My examples below use a table name of tblRegister with columns of 
> EmployeeNo, RegDate, RegTime and Description.
> 
> Obviously, change these to your own. It is not recommended to use table or 
> column names with spaces or to use reserved words like date or time.
> 
> Make a backup of your table BEFORE trying these!
> 
> If you want to delete the rows use something like, 
> 
> delete * from tblRegister
> where Description = "OUT"
> and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
> " and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))
> 
> If you want to update them...
> 
> update tblRegister
> set RegDate = dateadd("d", -1, RegDate), RegTime = "23:59"
> where Description = "OUT"
> and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
> " and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))
> 
> Note: I used a time of 23:59 as we don't know the real time they left and, 
> presumably, we want it to be after any other times registered. You can change 
> this and / or make the query calculate a time if you need to.
> 
> And the date gets set to the day before but you might need to do a bit more 
> here if yesterday wasn't the last day they were in.
> 
> Also, the above work for all dates in the table - you may want to restrict 
> it to today or the latest.
> 
> Hope this helps
> 
> Regards
> 
> Andy Hull
> 
> 
> "Marco" wrote:
> 
> > Hello. I'm creating a querie that lists all employee activity. So the querie 
> > runs onver a table that has all In and Out of the employees registries. 
> > Sometimes in the the first day is Out, it happens because the employee 
> > forgets to register is Out of job. So, is it possible to remove that register 
> > in order to have the first register of the day has a IN? Even better was 
> > changing the date of that Out register to the previous date.
> > 
> > This is ok to happen because the door don't open if the empoyee don't make 
> > all register regular. So in the new day if a Out is no detected on the system 
> > is like the employee never Out. So before he can In he must register Out. :)
> > 
> > Imagine that I have this:
> > ---------------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   15-05-2007         08:00              OUT
> > 1010                   15-05-2007         08:01              IN
> > 1010                   15-05-2007         18:00              Out
> > 
> > and I need this:
> > --------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   15-05-2007         08:01              IN
> > 1010                   15-05-2007         18:00              Out
> > 
> > 
> > 
> > This error hapens when the software detects this:
> > ------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   14-05-2007         08:01              IN
> > 
> > This means that in 15th May the employee must register the Out to be able to 
> > In.
> > 
> > Any idea? Please help.
> > 
> > Regards,
> > Marco
> > 
> > 
0
Utf
5/27/2007 2:27:00 PM
Hi. In both example returns me the message "Unknown"

In delete I used:
delete * from 2_tbl_Actual_Historico_Almoco
where Descricao = "Saída Torniquete 2"
and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
"EmployeeNumber = " & EmployeeNumber & 
" and Data_Ge = " & format(Data_GE, "\#dd\/mm\/yyy\#"))


and in update I used:
update 2_tbl_Actual_Historico_Almoco
set Data_GE = dateadd("d", -1, Data_GE), Hora_GE = "23:59"
where Descricao1 = "Saída Torniquete 2"
and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
"EmployeeNumber = " & EmployeeNumber & 
" and Data_GE = " & format(Data_GE, "\#dd\/mm\/yyyy\#"))

I had to made some changes because our date starts with Days and then months.

Any idea?

Regards,
Marco







"Andy Hull" wrote:

> Hi Marco
> 
> My examples below use a table name of tblRegister with columns of 
> EmployeeNo, RegDate, RegTime and Description.
> 
> Obviously, change these to your own. It is not recommended to use table or 
> column names with spaces or to use reserved words like date or time.
> 
> Make a backup of your table BEFORE trying these!
> 
> If you want to delete the rows use something like, 
> 
> delete * from tblRegister
> where Description = "OUT"
> and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
> " and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))
> 
> If you want to update them...
> 
> update tblRegister
> set RegDate = dateadd("d", -1, RegDate), RegTime = "23:59"
> where Description = "OUT"
> and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
> " and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))
> 
> Note: I used a time of 23:59 as we don't know the real time they left and, 
> presumably, we want it to be after any other times registered. You can change 
> this and / or make the query calculate a time if you need to.
> 
> And the date gets set to the day before but you might need to do a bit more 
> here if yesterday wasn't the last day they were in.
> 
> Also, the above work for all dates in the table - you may want to restrict 
> it to today or the latest.
> 
> Hope this helps
> 
> Regards
> 
> Andy Hull
> 
> 
> "Marco" wrote:
> 
> > Hello. I'm creating a querie that lists all employee activity. So the querie 
> > runs onver a table that has all In and Out of the employees registries. 
> > Sometimes in the the first day is Out, it happens because the employee 
> > forgets to register is Out of job. So, is it possible to remove that register 
> > in order to have the first register of the day has a IN? Even better was 
> > changing the date of that Out register to the previous date.
> > 
> > This is ok to happen because the door don't open if the empoyee don't make 
> > all register regular. So in the new day if a Out is no detected on the system 
> > is like the employee never Out. So before he can In he must register Out. :)
> > 
> > Imagine that I have this:
> > ---------------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   15-05-2007         08:00              OUT
> > 1010                   15-05-2007         08:01              IN
> > 1010                   15-05-2007         18:00              Out
> > 
> > and I need this:
> > --------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   15-05-2007         08:01              IN
> > 1010                   15-05-2007         18:00              Out
> > 
> > 
> > 
> > This error hapens when the software detects this:
> > ------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   14-05-2007         08:01              IN
> > 
> > This means that in 15th May the employee must register the Out to be able to 
> > In.
> > 
> > Any idea? Please help.
> > 
> > Regards,
> > Marco
> > 
> > 
0
Utf
5/27/2007 4:51:01 PM
Hi. Check my last post "Delete record if a specific value is the first of the 
day"

My explanation is best there.

Regards







"Andy Hull" wrote:

> Hi Marco
> 
> My examples below use a table name of tblRegister with columns of 
> EmployeeNo, RegDate, RegTime and Description.
> 
> Obviously, change these to your own. It is not recommended to use table or 
> column names with spaces or to use reserved words like date or time.
> 
> Make a backup of your table BEFORE trying these!
> 
> If you want to delete the rows use something like, 
> 
> delete * from tblRegister
> where Description = "OUT"
> and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
> " and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))
> 
> If you want to update them...
> 
> update tblRegister
> set RegDate = dateadd("d", -1, RegDate), RegTime = "23:59"
> where Description = "OUT"
> and RegTime = dmin("RegTime", "tblRegister", "EmployeeNo = " & EmployeeNo & 
> " and RegDate = " & format(RegDate, "\#mm\/dd\/yyyy\#"))
> 
> Note: I used a time of 23:59 as we don't know the real time they left and, 
> presumably, we want it to be after any other times registered. You can change 
> this and / or make the query calculate a time if you need to.
> 
> And the date gets set to the day before but you might need to do a bit more 
> here if yesterday wasn't the last day they were in.
> 
> Also, the above work for all dates in the table - you may want to restrict 
> it to today or the latest.
> 
> Hope this helps
> 
> Regards
> 
> Andy Hull
> 
> 
> "Marco" wrote:
> 
> > Hello. I'm creating a querie that lists all employee activity. So the querie 
> > runs onver a table that has all In and Out of the employees registries. 
> > Sometimes in the the first day is Out, it happens because the employee 
> > forgets to register is Out of job. So, is it possible to remove that register 
> > in order to have the first register of the day has a IN? Even better was 
> > changing the date of that Out register to the previous date.
> > 
> > This is ok to happen because the door don't open if the empoyee don't make 
> > all register regular. So in the new day if a Out is no detected on the system 
> > is like the employee never Out. So before he can In he must register Out. :)
> > 
> > Imagine that I have this:
> > ---------------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   15-05-2007         08:00              OUT
> > 1010                   15-05-2007         08:01              IN
> > 1010                   15-05-2007         18:00              Out
> > 
> > and I need this:
> > --------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   15-05-2007         08:01              IN
> > 1010                   15-05-2007         18:00              Out
> > 
> > 
> > 
> > This error hapens when the software detects this:
> > ------------------------------------------------------------------------
> > Employe No.             Date                Time             Description
> > 1010                   14-05-2007         08:01              IN
> > 
> > This means that in 15th May the employee must register the Out to be able to 
> > In.
> > 
> > Any idea? Please help.
> > 
> > Regards,
> > Marco
> > 
> > 
0
Utf
5/27/2007 5:57:00 PM
On Sun, 27 May 2007 09:51:01 -0700, Marco <Marco@discussions.microsoft.com>
wrote:

>Hi. In both example returns me the message "Unknown"
>
>In delete I used:
>delete * from 2_tbl_Actual_Historico_Almoco
>where Descricao = "Sa�da Torniquete 2"
>and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
>"EmployeeNumber = " & EmployeeNumber & 
>" and Data_Ge = " & format(Data_GE, "\#dd\/mm\/yyy\#"))
>
>
>and in update I used:
>update 2_tbl_Actual_Historico_Almoco
>set Data_GE = dateadd("d", -1, Data_GE), Hora_GE = "23:59"
>where Descricao1 = "Sa�da Torniquete 2"
>and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
>"EmployeeNumber = " & EmployeeNumber & 
>" and Data_GE = " & format(Data_GE, "\#dd\/mm\/yyyy\#"))
>
>I had to made some changes because our date starts with Days and then months.

A literal date in an Access query *ignores* the regional date/time settings.
You must use either the American mm/dd/yyyy format, or an unambiguous format
such as dd-MMM-yyyy or yyyy.mm.dd.  The format you are using *will not work
correctly*.


             John W. Vinson [MVP]
0
John
5/27/2007 7:21:01 PM
Hello John.

why do you think the SQL code is not working on may table? Is always 
returnin the error of unknown.

Regards,
Marco





"John W. Vinson" wrote:

> On Sun, 27 May 2007 09:51:01 -0700, Marco <Marco@discussions.microsoft.com>
> wrote:
> 
> >Hi. In both example returns me the message "Unknown"
> >
> >In delete I used:
> >delete * from 2_tbl_Actual_Historico_Almoco
> >where Descricao = "Saída Torniquete 2"
> >and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
> >"EmployeeNumber = " & EmployeeNumber & 
> >" and Data_Ge = " & format(Data_GE, "\#dd\/mm\/yyy\#"))
> >
> >
> >and in update I used:
> >update 2_tbl_Actual_Historico_Almoco
> >set Data_GE = dateadd("d", -1, Data_GE), Hora_GE = "23:59"
> >where Descricao1 = "Saída Torniquete 2"
> >and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
> >"EmployeeNumber = " & EmployeeNumber & 
> >" and Data_GE = " & format(Data_GE, "\#dd\/mm\/yyyy\#"))
> >
> >I had to made some changes because our date starts with Days and then months.
> 
> A literal date in an Access query *ignores* the regional date/time settings.
> You must use either the American mm/dd/yyyy format, or an unambiguous format
> such as dd-MMM-yyyy or yyyy.mm.dd.  The format you are using *will not work
> correctly*.
> 
> 
>              John W. Vinson [MVP]
> 
0
Utf
5/27/2007 11:12:01 PM
On Sun, 27 May 2007 16:12:01 -0700, Marco <Marco@discussions.microsoft.com>
wrote:

>Hello John.
>
>why do you think the SQL code is not working on may table? Is always 
>returnin the error of unknown.

What is the actual error message and message number? 

             John W. Vinson [MVP]
0
John
5/28/2007 12:28:52 AM
On Mon, 28 May 2007 02:53:01 -0700, Marco <Marco@discussions.microsoft.com>
wrote:

>Hello. the error message only says "Unknown" nothing else.

That does not appear to be an Access error message, then. Could it be coming
from your application???

Can you create a Query (in the query window) duplicating what your code is
trying to create? Does *it* give a message Unknown (or some other error
message)?

Remember... we cannot see your database. I have no idea how your tables are
structured or whether the query you're building will even work.

             John W. Vinson [MVP]
0
John
5/28/2007 4:33:43 PM
Hello John.

I'm sorry all this trouble. But i'm really stucked and I have no one else to 
make this kind of questions.

In portugal Access is not very used. but I like it. 

So, let me give the structure of my table from where I wnat to delete or 
update

Name of the table:
2_tbl_Actual_Historico_Almoco

Field Name                            Type
EmployeeNumber                   Text
MicroDate                             Number  ( is the date im decimal)
Data_GE                                Text  (this is the date, I know that 
is as text)
Descricao                              Text
Calculos_Hora                       Number
Hora_GE                                Text  (this is the time)

I'm trying to run this querie that Andy provide me:

delete * from 2_tbl_Actual_Historico_Almoco
where Description = "Saída Torniquete 2"
and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
"EmployeeNumber = " & EmployeeNumber & 
" and Data_GE = " & format(Data_GE, "\#mm\/dd\/yyyy\#"))

I alreday try to change the Hora_GE (time) and Data_Ge (date) to Date/Time 
type of data.

What do you think?

<b>Thanks</b>

Regards once again,
Marco

                 





"John W. Vinson" wrote:

> On Mon, 28 May 2007 02:53:01 -0700, Marco <Marco@discussions.microsoft.com>
> wrote:
> 
> >Hello. the error message only says "Unknown" nothing else.
> 
> That does not appear to be an Access error message, then. Could it be coming
> from your application???
> 
> Can you create a Query (in the query window) duplicating what your code is
> trying to create? Does *it* give a message Unknown (or some other error
> message)?
> 
> Remember... we cannot see your database. I have no idea how your tables are
> structured or whether the query you're building will even work.
> 
>              John W. Vinson [MVP]
> 
0
Utf
5/28/2007 5:02:00 PM
On Mon, 28 May 2007 10:02:00 -0700, Marco <Marco@discussions.microsoft.com>
wrote:

>So, let me give the structure of my table from where I wnat to delete or 
>update
>
>Name of the table:
>2_tbl_Actual_Historico_Almoco
>
>Field Name                            Type
>EmployeeNumber                   Text
>MicroDate                             Number  ( is the date im decimal)
>Data_GE                                Text  (this is the date, I know that 
>is as text)
>Descricao                              Text
>Calculos_Hora                       Number
>Hora_GE                                Text  (this is the time)
>
>I'm trying to run this querie that Andy provide me:
>
>delete * from 2_tbl_Actual_Historico_Almoco
>where Description = "Sa�da Torniquete 2"
>and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
>"EmployeeNumber = " & EmployeeNumber & 
>" and Data_GE = " & format(Data_GE, "\#mm\/dd\/yyyy\#"))
>
>I alreday try to change the Hora_GE (time) and Data_Ge (date) to Date/Time 
>type of data.

If you will be sorting or searching by date, you would really be much better
off having Hora_GE and Data_GE stored together in a single date/time field.
You say they are Text fields now - in what format are they stored? Could you
post a couple of examples? It should be possible to create a new Date/Time
field and update it with the existing data, using the DateSerial and
TimeSerial functions.

Your SQL uses a fieldname "Description" but in your table this appears to be
"Descricao". Also you have an odd mix of quotes. Is this query being created
in VBA code, or is this the SQL view from the Query window?

Guessing at a few things - such as guessing that Data_GE is a Text field in
dd/mm/yyyy format - try copying and pasting this into the SQL window of a new
query. BACK UP YOUR DATABASE FIRST - delete queries cannot be reversed!

DELETE * FROM [2_tbl_Actual_Historico_Almoco]
WHERE [Descricao] = "Sa�da Torniquete 2"
AND [Hora_GE] = & "'" DMin("[Hora_GE]", "2_tbl_Actual_Historico_Almoco",
"[EmployeeNumber] = '" & [EmployeeNumber] & "' AND [Data_GE] = '" & [Data_GE]
& "'") & "'";

This will delete the earliest record on *every* day in the table for every
employee. It's not completely clear that is what you want to do!

             John W. Vinson [MVP]
0
John
5/28/2007 8:20:39 PM
Hi. This looks a "cruzade".

Yes, if "Saída Torniquete 2" is the first record of the day I want to 
delete. Why? Because if it stays on the table says that the employee Out 
(Out=Saída) before he could In, and that cannot be possible. These situation 
occours because sometimes employees "forget" to pass the card "saying" that 
they are leaving the office. And because for every In on job, must have an 
out, in the folling day the employee must past a card to out, the out of 
previous day in to be allowed to pass the card to get in.

I tried your querie but returns me a erro. Sintaxe Error (operator missing). 
 This is not easy. And Yes, I chage the type of data do date and time and I 
made the update.

I'm now triyng from another way. I create a querie that shows me those wrong 
records. then I create another querie that shows me the unmatch records. I 
think that for there I may go there. well......... :)

Best Regards,
Marco















"John W. Vinson" wrote:

> On Mon, 28 May 2007 10:02:00 -0700, Marco <Marco@discussions.microsoft.com>
> wrote:
> 
> >So, let me give the structure of my table from where I wnat to delete or 
> >update
> >
> >Name of the table:
> >2_tbl_Actual_Historico_Almoco
> >
> >Field Name                            Type
> >EmployeeNumber                   Text
> >MicroDate                             Number  ( is the date im decimal)
> >Data_GE                                Text  (this is the date, I know that 
> >is as text)
> >Descricao                              Text
> >Calculos_Hora                       Number
> >Hora_GE                                Text  (this is the time)
> >
> >I'm trying to run this querie that Andy provide me:
> >
> >delete * from 2_tbl_Actual_Historico_Almoco
> >where Description = "Saída Torniquete 2"
> >and Hora_GE = dmin("Hora_GE", "2_tbl_Actual_Historico_Almoco", 
> >"EmployeeNumber = " & EmployeeNumber & 
> >" and Data_GE = " & format(Data_GE, "\#mm\/dd\/yyyy\#"))
> >
> >I alreday try to change the Hora_GE (time) and Data_Ge (date) to Date/Time 
> >type of data.
> 
> If you will be sorting or searching by date, you would really be much better
> off having Hora_GE and Data_GE stored together in a single date/time field.
> You say they are Text fields now - in what format are they stored? Could you
> post a couple of examples? It should be possible to create a new Date/Time
> field and update it with the existing data, using the DateSerial and
> TimeSerial functions.
> 
> Your SQL uses a fieldname "Description" but in your table this appears to be
> "Descricao". Also you have an odd mix of quotes. Is this query being created
> in VBA code, or is this the SQL view from the Query window?
> 
> Guessing at a few things - such as guessing that Data_GE is a Text field in
> dd/mm/yyyy format - try copying and pasting this into the SQL window of a new
> query. BACK UP YOUR DATABASE FIRST - delete queries cannot be reversed!
> 
> DELETE * FROM [2_tbl_Actual_Historico_Almoco]
> WHERE [Descricao] = "Saída Torniquete 2"
> AND [Hora_GE] = & "'" DMin("[Hora_GE]", "2_tbl_Actual_Historico_Almoco",
> "[EmployeeNumber] = '" & [EmployeeNumber] & "' AND [Data_GE] = '" & [Data_GE]
> & "'") & "'";
> 
> This will delete the earliest record on *every* day in the table for every
> employee. It's not completely clear that is what you want to do!
> 
>              John W. Vinson [MVP]
> 
0
Utf
5/28/2007 11:35:00 PM
Reply:

Similar Artilces:

log off in start menu
With XP sp3 home edition is there any way to get rid of the "log off" in the Start Menu and still have the classic blue shut down window when you shut down. I'd much prefer to keep the blue shut down window rather than have the Drop Down window appear with all the options. bandi wrote: > With XP sp3 home edition is there any way to get rid of the "log off" in the > Start Menu and still have the classic blue shut down window when you shut > down. I'd much prefer to keep the blue shut down window rather than have > the Drop Down win...

Removal of E2k Server & Error Message
Hi all, I have recently built a new E2003 server and moved the mailboxes and all the rest of the formalities such as moving the PF & Schedule Free/Busy data etc. Just trying to uninstall the old E2k server which has no part in any email delivery now within my organisation but am getting one error which is that the exchange install cannot be removed because one or mailboxes that still reside on the server as must be either removed or mail disabled. The only description of any mail enabled boxes in the 3 mailbox stores on the server are the System Attendant, SystemMailbox (with a 100...

Media Player start
After catching a virus and installing Sophos antivirus, WMP 11 will not work. Double-clicking the icon does nothing--Not even an error message. No other link to WMP does anything. Nothing even appears in Task manager's applications or processes when it is clicked. System Restore doesn't have a restore point at an early enough date. Any help would be great. Thanks Submitted via EggHeadCafe - Software Developer Portal of Choice Professional XML for .NET Developers [WROX] http://www.eggheadcafe.com/tutorials/aspnet/0a80b016-65ca-49fc-8e73-55b070281e56/professional-xml-for-net....

Removing Message from Outbox
Using Outlook 2003, I accidentally tried to send a 27 MB file to someone. I would now like to remove the message from the Outbox. However, I have not been able to do so either by deleting the message from the Outbox or deleting the entirer Outbox folder from the Explore screen. Any suggestions? ...

How do I remove duplicate entries from a list?
Look at Data/Advanced Filter Bob Umlas Excel MVP "E. Reta" <E. Reta@discussions.microsoft.com> wrote in message news:34E54578-E3AA-44D8-93CB-5C7D11E46D10@microsoft.com... > ...

How can I remove a link that won't go away
When I click on the "Break Link" button, the link doesn't leave. Is the link to an external file? Try copy paste special - Values -- Regards Dave Hawley www.ozgrid.com "Margie" <Margie@discussions.microsoft.com> wrote in message news:4DF64E5F-A24C-4A18-AED7-293C25F33954@microsoft.com... > When I click on the "Break Link" button, the link doesn't leave. I'd use Bill Manville's FindLink program: http://www.oaltd.co.uk/MVP/Default.htm Margie wrote: > > When I click on the "Break Link" button, the l...

Rules only work when I first start Outlook 2003
Hi all. I have a problem with my rules in Outlook 2003. I've upgraded from OL XP, and now my rules only seem to work when I first start up OL 2003 and it checks my mail. I'm using several POP accounts and I want the mails moved to specific folders depending on the mail account they come in on. The rules worked fine when I was running OL XP, but now they only run on the first mail check as soon as I open OL. Any subsequent mail checks, either automatic (every 5 mins) or manual just sends any new mail to the Inbox. I have read about an OL prob where the rules don't work on the fir...

Prefix + auto remove
Hi, I export my address book from outlook express 2003 and import to outlook2007 as activesync require outlook for contacts storage. however, all the prefix '+' are removed which made my contacts all invalid, i.e unable to send SMS. Any idea how to resolve? is ol2007 on a new computer? if so, did you set up the modem's area code and dialing rules in control panel, modem properties? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/ou...

exchange will not start, error directory service cannot start
after a power outage, my server would not boot. Found that three of the hard drives were offline, (raid 5 with five disks) Called dell, brought two back online and did a rebuild on the last one that was offline. They are all online but when I boot it up I get this error: Security accounts manager initialization failed because of the following error: Directory Service cannot start. Error status: 0xc00002e1. Please shutdown and reboot into Directory Services Restore Mode. I have been on hold with MS tech ....... -- Glenn MCP A+ Network Admin MBBC ...

IInternetProtocol Start Method not working correctly
Hello, I've been searching and searching and found nothing to help me out. Here's my situation: I need to capture URL Requests (clicks or address bar entries) and if it matches a specific URL like "http://somedomain.com/blorg.exe" I want to be able to intercept that and tell IE i'll take care of it myself, OR, if it does not pass my criteria, let IE handle the click. I DO NOT want to register my own protocol like mark://somedomain.com/.... I need to be able to look at the whole URL This is what I've done so far: I have created a namespacehandler in the HKCR are...

T/F Can't set Hyperlink base from within macro
Excel 2000. I wanted to set the Hyperlink base from within a macro. Then I read: "BuiltinDocumentProperties Property Returns a DocumentProperties collection that represents all the built-in document properties for the specified workbook. Read-only." Among the listed built-in properties is "Hyperlink Base". Putting that together with "read only", I deduce that although I can set the Hyperlink Base as a user, this cannot be done via a macro. Am I correct or is there a loophole somewhere that would allow me to do this? Chris Beall Hi Chris: Sub chris3() ...

.Net generated MDI apps not starting in Explorer
I have ported my MFC based apps from VS6/MFC6 to .Net/MFC7 and found that I can no longer start MDI type apps by double clicking their associated documents in the Windows Explorer, whereas SDI apps open up fine as before. The same even goes for a simple MDI skeleton app created with the AppWizard in .Net. The documents are being properly registered in the registry, but it seems as if the MDI apps are not being forwarded the clicked document file name. Consequently the MDI frame window does not show, though the app is listed as running in the processes view. Any ideas what could be mis...

remove com add-ins in Office 2007
I have Chinese menues appearing when I enter Access, which I have traced to a Com Add-In. I have found a way to disable it, but want to remove it permanently. When I try to remove it a message says only an administrator can remove the Add-In. I am the administrator for Windows operating system on my computer, but cannot remove a Com Add-In within Access. What am I missing or doing wrong? What operating system? If Vista or Win 7, find msaccess.exe wherever it is in Program Files, right-click on it and select Run as Administrator. -- Doug Steele, Microsoft Access MVP http:...

How to stop calculating CPP when employee turns to 65 years of age
Hi; I am using Canadian Payroll in GP 10, one of my employee who turned to 65 years of old, subject to Canada regulation, he does not need to contribute CPP. How can I configure Canadian Payroll to calculate CPP under this employee, today; I have to remove the calculated amount manuall when I ran pay roll each time. The date of birth of the employee has been entered in system already. -- Kane I assume the Canadian Payroll is similar to that of the US in the sense that you have benefits and deductions. Canada Pension Plan (CPP) is a deduction that is (must be) associated to an empl...

Money won't start #3
When I double-click Money, it opens initially, but then after a couple of seconds, it closes. This is before I see any logon or even any splash screen. Money used to work on this computer, a few weeks ago, but now it doesn't. I have installed several programs on the computer, most recently Google Earth, but I don't know exactly when the program stopped working. However, I believe it stopped working when I detached the external hard drive where I had my primary Money file. I copied the Money file to the internal hard drive on my laptop, but even if I double click that, Money ...

Received Mail File Attachment always removed by OE
Hi everytime i get a file attachment of my friends OE always removes the file attachment as it says "OE Removed access to the following unsafe attachments in your mail:" i cant find any option to remove this.. can you please help.... thanks sally Open OE and select Tools | Options | Security tab and uncheck the second option from the top concerning potentially dangerous attachments. "Sally" <anonymous@discussions.microsoft.com> wrote in message news:29e501c470a0$d575ec50$a601280a@phx.gbl... > Hi everytime i get a file attachment of my friends OE > always ...

old server removed, now a new synch issue
Hello folks. Today I finally moved the last mailboxes and public folders off our old exchange 2003 server to a new one. I followed all the KB's I could find about properly decomissioning the server, and then uninstalled Exchange 2003 on that system. Since then, all my Outlook 2003 clients are getting the following synch issue whenever you first open outlook with cached mode. And I've tried recreating my profile, that doesn't help at all. This has to be related to something I missed. Anyone have suggestions? 15:54:03 Synchronizer Version 11.0.5604 15:54:03 Synchronizin...

employee annual sick leave tracker with hours owing not used
I need an employee absence and sick leave tracker with hours owing not used. I have downloaded the absence tracker and have set it up for the business but realised it needs to tell me, somehow, the accumulated hours for each employee. I put in the accrued hours with a minus sign in front i.e - 3.077 for holidays, every payday but there must be an easier way which is accurate. If anyone has any ideas or a different spreadsheet that could help me, i will be one very happy camper. Thanks in advance. ...

Exchange Services Starting
Exchange 2K on Win2K Server This is a "backup" Exchange Server, so the services should not start unless I ask them to, so all of my Exchange services are set to "Manual". Recently, I lost a drive in my array. Since I rebuilt the array my System Attendant service keep starting as soon as I connect to the network, even though its set to Manual. It doesn't do anything if I pull the network cable or if I set the service to Disabled. The Dependent Services are just MTA Stacks and Information Store. While I can just keep the service disabled, I have a fear that this...

Append values and remove text
Hi, I have a number of columns - some have values and some don't. I wish to append only the columns with values and have comma separators. Is there an easy way to do this? Currently, I do this in 4 steps but I'm hoping there is an easier way. 1) Column EQ has a formula to append values in columns R thru Z 2) Column ER looks at EQ and substitutes " ," with blanks. Unfortunately ER always ends with ", " PLUS if only one column has any values, then ER also starts with " ," So to fix this, I do 2 more steps: 3) Column ES looks at ER t...

Start program in minimized window
How do I start a program (e.g. Internet Explorer Version 8) in a minimized window, just a tab in the toolbar? Can this be done for any program and is there a universal switch for this? PSRumbagh wrote: > How do I start a program (e.g. Internet Explorer Version 8) in a minimized > window, just a tab in the toolbar? Can this be done for any program and is > there a universal switch for this? - To start the program minimized to the Taskbar: Create a shortcut to the program, right-click the shortcut, click Properties, change "Run:" to "Minimized". ...

I need to get week start and week end dates to change automatically
I'm trying to get the week start and week end dates to chang automatically on a time sheet that I am working on. Anybody have formula? Joh -- Message posted from http://www.ExcelForum.com John, =INT(NOW()+2-WEEKDAY(NOW())) will return Monday's date, and =INT(NOW()+6-WEEKDAY(NOW())) will return Friday's date. Format as dates. HTH, Bernie MS Excel MVP "jlyons360 >" <<jlyons360.192pxt@excelforum-nospam.com> wrote in message news:jlyons360.192pxt@excelforum-nospam.com... > I'm trying to get the week start and week end dates to change > automa...

How to remove DRM Protection from WMV/WMA/M4P/M4V/M4A/M4B/ASF and convert other popular video and audio even HD video 07-15-10
The guide shows How to remove DRM Protection from WMV/WMA/M4P/M4V/M4A/M4B/ASF and convert other popular video and audio even HD video Stpe 1: Download(http://www.5idownload.com/download/daniu-digital-media-converter-pro_full310_461741.exe) and install the Daniusoft Media Converter Pro( http://www.5idownload.com/dan-Media-Converter-pro.html ) Stpe 2: Run the software and click "Add…" button to load WMA or M4A, M4B, AAC, WMV, M4P, M4V, ASF files ( http://www.5idownload.com/img/guide-dan-media-converter-pro1.jpg) Step 3: Choose output formats. If you want to convert protected aud...

When I print from word, the letter f is missing from the print jo.
It could be worse. All your letters were missing from this area, which is used to describe the problem or solution. Mike Mike Koewler wrote: > It could be worse. All your letters were missing from this area, which > is used to describe the problem or solution. > > Mike And his entire post was missing from the Word group... ;o) -- In memory of MS MVP Alex Nichol: http://www.dts-l.org/ ...

Returning something doesn't remove it from the expense category.
I printed out a Report for 2008 to show all my spending and what I can do in 2009 to do better at budgeting my money. For my Household:Electronics category, I showed almost $10,000. I was like, WTF? I checked it and during 2008 I bought and returned two flat panel televisions before deciding on the one I have now. They were $3000, then $2800, and the one I finally got was $1400. Well both the $3000 and $2800 are still included in the total on the report. I entered the transaction as an expense the first time of $3000 towards Household:Electronics. Then when I returned it, I just ...