A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

use query result to display a message



 
 
Thread Tools Display Modes
  #1  
Old July 27th, 2006, 12:21 AM posted to microsoft.public.access.queries
JJF
external usenet poster
 
Posts: 9
Default use query result to display a message

I use a Access Time Clock to tract employes hours. An employee enters his
EmId and clicks a command button to SignIn. The computer enters the date &
time. He does the same to SingOut. Sometimes someone forgets to SignOut. How
do I restrict the next SignIn before correcting the forgotten SignOut. thanks
JJF
  #2  
Old July 27th, 2006, 12:38 AM posted to microsoft.public.access.queries
Michel Walsh
external usenet poster
 
Posts: 2,404
Default use query result to display a message

Hi,



The latest operation, for a given employee, could not be of the same type
(ie, cannot be a sign in if you try a sign in). Since that implies a
cross-record validation (vertically). A standard table validation rule only
work horizontally, on one record, not across records. Jet-CHECK() constraint
allows vertical, across records, validations, as a rule, but MS SQL Server
would use trigger (since its CHECK constraint does not allow vertical,
across records, validations). If you are in a FORM, that is easier, look at
the records, for the given employee, and it is ok to sign in if:

DCount("*", "tableName", "employee=1100 AND SignInOut=-1) =
DCount("*", "tableName", "employee=1100 AND SignInOut=0")



ie, if the number of sign in = the number of sign out, for that employee.
The problem with table validation carried only at a form level is that entry
of data through another form, or another interface, may not do the
appropriate check and thus, data is in a less secure state than if the
validation is carried at a table design level.


Hoping it may help,
Vanderghast, Access MVP



"JJF" wrote in message
...
I use a Access Time Clock to tract employes hours. An employee enters his
EmId and clicks a command button to SignIn. The computer enters the date &
time. He does the same to SingOut. Sometimes someone forgets to SignOut.
How
do I restrict the next SignIn before correcting the forgotten SignOut.
thanks
JJF



  #3  
Old July 27th, 2006, 12:58 AM posted to microsoft.public.access.queries
JJF
external usenet poster
 
Posts: 9
Default use query result to display a message

Thanks Mike I'll see where it leads ...JJF

"Michel Walsh" wrote:

Hi,



The latest operation, for a given employee, could not be of the same type
(ie, cannot be a sign in if you try a sign in). Since that implies a
cross-record validation (vertically). A standard table validation rule only
work horizontally, on one record, not across records. Jet-CHECK() constraint
allows vertical, across records, validations, as a rule, but MS SQL Server
would use trigger (since its CHECK constraint does not allow vertical,
across records, validations). If you are in a FORM, that is easier, look at
the records, for the given employee, and it is ok to sign in if:

DCount("*", "tableName", "employee=1100 AND SignInOut=-1) =
DCount("*", "tableName", "employee=1100 AND SignInOut=0")



ie, if the number of sign in = the number of sign out, for that employee.
The problem with table validation carried only at a form level is that entry
of data through another form, or another interface, may not do the
appropriate check and thus, data is in a less secure state than if the
validation is carried at a table design level.


Hoping it may help,
Vanderghast, Access MVP



"JJF" wrote in message
...
I use a Access Time Clock to tract employes hours. An employee enters his
EmId and clicks a command button to SignIn. The computer enters the date &
time. He does the same to SingOut. Sometimes someone forgets to SignOut.
How
do I restrict the next SignIn before correcting the forgotten SignOut.
thanks
JJF




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display query result in a Control on a Form curniac Running & Setting Up Queries 1 July 19th, 2006 05:46 PM
Calculate a percentage using 2 different query totals jbeck2010 Database Design 18 March 1st, 2005 12:51 AM
Big number gives error! Sara Mellen Running & Setting Up Queries 8 October 11th, 2004 02:48 AM
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM
Display a query result in form Le Tran New Users 0 June 15th, 2004 09:08 PM


All times are GMT +1. The time now is 12:26 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.