Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

basic clock in and out application

hi
i would like to build a simple clock in clock out application with users that will help me keep
track of them and stored in access database.

 i can show couple of images of how that would look like

but basically

a form where you could type in your user name and will be checked with the access database

then a small form appears with 2 butons

Clock In Clock Out

and that save in the database the clock in time date and the user

and if clock out that would shift end   time and data and user would be saved into the database

thank you

if you guys want to see the images post your e-mail and i will send it to you

just to get a better look at what i am asking for

thank you
0
emailworks
Asked:
emailworks
  • 2
1 Solution
 
mokuleCommented:
Hi
In my member profile You've got my e-mail. Send me Your images.
0
 
mokuleCommented:
Hi
I've got images.
Not look at them yet
This is quick example, on one Form.

unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    Panel3: TPanel;
    laTime: TLabel;
    Timer1: TTimer;
    btnClockIn: TButton;
    btnClockOut: TButton;
    edUser: TEdit;
    edPswd: TEdit;
    btnLogin: TButton;
    Label2: TLabel;
    Label3: TLabel;
    btnCancel: TButton;
    procedure Timer1Timer(Sender: TObject);
    procedure btnClockInClick(Sender: TObject);
    procedure btnClockOutClick(Sender: TObject);
    procedure btnLoginClick(Sender: TObject);
    procedure edUserChange(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
var
  str: string;
begin
  str := TimeToStr(Now);
  if str <> laTime.Caption then
    laTime.Caption := str;
end;

procedure TForm1.btnClockInClick(Sender: TObject);
begin
// Your ClockIn procedure
//  ClockIn(edUser.Text,laTime.Caption);
  Panel3.Enabled := False;
  Panel3.Visible := False;
  edUser.Text := '';
  edPswd.Text := '';
end;

procedure TForm1.btnClockOutClick(Sender: TObject);
begin
//  ClockOut(edUser.Text,laTime.Caption);
  Panel3.Enabled := False;
  Panel3.Visible := False;
  edUser.Text := '';
  edPswd.Text := '';
end;

procedure TForm1.btnLoginClick(Sender: TObject);
begin
  if (Length(edUser.Text) > 0) and (Length(edPswd.Text) > 0) then
    begin
//    if VerifyUser then  // Your user verification
      begin
      Panel3.Enabled := True;
      Panel3.Visible := True;
      end;
    end;
end;

procedure TForm1.edUserChange(Sender: TObject);
begin
  if (Length(edUser.Text) > 0) and (Length(edPswd.Text) > 0) then
    btnLogin.Enabled := True
  else
    btnLogin.Enabled := False
end;

procedure TForm1.btnCancelClick(Sender: TObject);
begin
  Panel3.Enabled := False;
  Panel3.Visible := False;
end;

end.


{dfm}

object Form1: TForm1
  Left = 217
  Top = 115
  BorderIcons = [biSystemMenu, biMinimize]
  BorderStyle = bsDialog
  Caption = 'Simple Clock In Out'
  ClientHeight = 268
  ClientWidth = 307
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 8
    Top = 8
    Width = 289
    Height = 73
    TabOrder = 0
    object laTime: TLabel
      Left = 32
      Top = 8
      Width = 225
      Height = 48
      Alignment = taCenter
      AutoSize = False
      Caption = 'laTime'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -48
      Font.Name = 'Arial'
      Font.Style = []
      ParentFont = False
    end
  end
  object Panel2: TPanel
    Left = 8
    Top = 96
    Width = 289
    Height = 89
    TabOrder = 1
    object Label2: TLabel
      Left = 16
      Top = 8
      Width = 22
      Height = 13
      Caption = 'User'
    end
    object Label3: TLabel
      Left = 160
      Top = 8
      Width = 46
      Height = 13
      Caption = 'Password'
    end
    object edUser: TEdit
      Left = 16
      Top = 24
      Width = 113
      Height = 21
      TabOrder = 0
      OnChange = edUserChange
    end
    object edPswd: TEdit
      Left = 160
      Top = 24
      Width = 113
      Height = 21
      PasswordChar = '*'
      TabOrder = 1
      OnChange = edUserChange
    end
    object btnLogin: TButton
      Left = 107
      Top = 56
      Width = 75
      Height = 25
      Caption = 'Login'
      Enabled = False
      TabOrder = 2
      OnClick = btnLoginClick
    end
  end
  object Panel3: TPanel
    Left = 8
    Top = 200
    Width = 289
    Height = 57
    Enabled = False
    TabOrder = 2
    Visible = False
    object btnClockIn: TButton
      Left = 8
      Top = 16
      Width = 75
      Height = 25
      Caption = 'Clock In'
      TabOrder = 0
      OnClick = btnClockInClick
    end
    object btnClockOut: TButton
      Left = 104
      Top = 16
      Width = 75
      Height = 25
      Caption = 'Clock Out'
      TabOrder = 1
      OnClick = btnClockOutClick
    end
    object btnCancel: TButton
      Left = 200
      Top = 16
      Width = 75
      Height = 25
      Caption = 'Cancel'
      TabOrder = 2
      OnClick = btnCancelClick
    end
  end
  object Timer1: TTimer
    Interval = 200
    OnTimer = Timer1Timer
    Left = 216
    Top = 40
  end
end
0
 
efryerCommented:
Emailworks,

I have just finished an application in delphi that does almost exactly what you are after

Features :
Access database backend (ADO) - Access chosen so that administrator can do their own specialised reports
Drop down user login (makes it easier for user to get name right)
Login with password (makes sure that another user cannot clock another in/out)
Main page just has users name displayed with Current time and Date, daily log of login or logout, two buttons for time on and time off
Admin section - Add/remove users, change users passwords, run a time report between two dates etc

Flow of the application for the user is

1) Login
2) clockin or clockout (button is greyed out dependent on their last action)
3) Close application

Is that the sort of thing you were after???

Regards

Bob
0
 
emailworksAuthor Commented:
yeah
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now