473,785 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Attendance register for a farm

5 New Member
Hi I am a self thought in access and been creating a couple of data bases for my farm.I am now building a attendance register and is keeping it as simple as possible.Table is as follow:
id(auto) : Date (=now()) : Employee 1 : Employee 2 : Employee 3 ............... .

What I need is to insert the value 1 into the field when a command button is clicked.The plan is to make a command button with the employee's picture on it that needs to be clicked for attendance.I am working with un schooled staff that doesn't know any thing about pc's.
The expression that I have tried is : on click : = [employee 1] = 1 but with no luck!
Mar 17 '07 #1
4 2375
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hi I am a self thought in access and been creating a couple of data bases for my farm.I am now building a attendance register and is keeping it as simple as possible.Table is as follow:
id(auto) : Date (=now()) : Employee 1 : Employee 2 : Employee 3 ............... .

What I need is to insert the value 1 into the field when a command button is clicked.The plan is to make a command button with the employee's picture on it that needs to be clicked for attendance.I am working with un schooled staff that doesn't know any thing about pc's.
The expression that I have tried is : on click : = [employee 1] = 1 but with no luck!
You need two tables. One with a list of Employees and the other for attendance as follows

tblEmployee
EmpNum (Primary Key - Autonumber)
EmpName

tblAttendance
AttendID (Primary Key - Autonumber)
DateWorked
EmpNum (Foreign Key Reference to tblEmployee)

Now in the button On Click Event
Expand|Select|Wrap|Line Numbers
  1. Private Sub BtnName_Click()
  2. Dim strSQL As String
  3.  
  4.    strSQL = "INSERT INTO tblAttendance ([DateWorked], [EmpNum]) " & _
  5.       "VALUES (" & Now() & ", " & 1 & ");"
  6.    DoCmd.RunSQL strSQL
  7.  
  8. End Sub
  9.  
Mary
Mar 17 '07 #2
Digitallad
5 New Member
Thank you for the reply
This sounds stupid but in witch form must the button be?
1) The tblAttendance form or a new form?
I tried the a new for with just the button on it but if I run the code I get a Run-time error '3075'
Syntax error (missing operator)
What I rather would like to do is having a table with the names of the employees in each column and the date as auto.
i.e..
tbl Attendance:

ID : (auto nr)
Date : (=now())
Peter : (data type , number)
John ;(data type , number)
Jack(data type , number) .......

The fields it self would not be visible on the form but only the Pictures of the employee's.
When button click the value 1 would be inserted in to the corresponding field.
Only reason I use the value 1 is that at the end of the month I will add each column together to get the days worked for a month.
To be honest I don't know much about coding but are learning at a huge pace. :)

Ps.The form will be auto loaded when access starts up and after the form is updated it will close and open the control form.
Mar 18 '07 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
Try this ...
Expand|Select|Wrap|Line Numbers
  1. Private Sub BtnName_Click()
  2. Dim strSQL As String
  3.  
  4.    strSQL = "INSERT INTO tblAttendance ([John]) " & _
  5.       "VALUES ("& 1 & ");"
  6.    DoCmd.RunSQL strSQL
  7.  
  8. End Sub
Just change the column name for each button.
Mar 20 '07 #4
yashumrhsn
19 New Member
Hi I am a self thought in access and been creating a couple of data bases for my farm.I am now building a attendance register and is keeping it as simple as possible.Table is as follow:
id(auto) : Date (=now()) : Employee 1 : Employee 2 : Employee 3 ............... .

What I need is to insert the value 1 into the field when a command button is clicked.The plan is to make a command button with the employee's picture on it that needs to be clicked for attendance.I am working with un schooled staff that doesn't know any thing about pc's.
The expression that I have tried is : on click : = [employee 1] = 1 but with no luck!
hi..am also doing same,if u have a correct code,can u please share me this..
please reply..thanks in advance..
Oct 15 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2851
by: crier_67 | last post by:
Hello all, I'm relatively new to Access and could use some direction on this task. I have a group with a FoxPro 2.6 for DOS membership & attendance database with about 200 member records. The group operates on a 28 week schedule, with meetings once each week. At the end of 6 months they create a new 28 week schedule, but preserve the prior 6 month attendance values. They view & edit attendance records for the "current period" and...
0
1255
by: shun | last post by:
Hello I strated a project "attendance register". consiists of user login and logintime and logout time using ASP.net. can any one help me, or any sites which have free source code about this. Thanks in advance. regards Shun
1
2570
by: Shun | last post by:
Hello, My requirement is to develop an Employee Attendance Register. For ex: I am in some X country and my office is in Y country. now my requirement is i want to check the employees present and also there previous days attendance(i.e complete Month employee Attendance). I am farwarding in 2 ways, 1. By searching in Google for any free attendance register software.
0
2268
by: spattarkine | last post by:
How to create daily attendance system for students which create warning after each 3 absents.idea is as soon as the class and section are selected,names and roll no of all the students of that class will appear and by clicing the checkbox a student is marked present.At the end of the month the ateendance report should appear like a snapshot of attendance register.
2
2875
by: timgeitz | last post by:
I would like to design a drop down option box on a form which gives me several choices for putting in an attendance date to record church attendance. Typically, a church secretary would record a member's attendance sometime after the date of attendance (eg. Monday or Tuesday after the Sunday's attendance). On my attendance form, I need to have an option box that would put in last Sunday's attendance date even though it's now Monday or Tuesday or...
0
2864
by: Bill | last post by:
I've searched comp.databases.ms-access for a solution and found help but still haven't got my problem solved. I want to record weekly attendance and print an attendance "check off" sheet where attendees simply check on their name row and class date column to record their attendance. The marked attendance sheet is later used to update the database and print an updated attendance sheet for the following week's class. I'm working with...
3
5612
by: pardhu | last post by:
I just need the code for this plz help me
5
8913
by: Lindie | last post by:
We use a spreadsheet to record attendance for pupils with special needs. They live-in so we need 365/365 attendance details. The spreadsheet is getting too cumbersome, a Db is needed. I would like to turn the spreadsheet into a database. In the spreadsheet we have every day listed and then simply enter an attendance code. for the Db I have 3 tables StudentDetails Attendance TeacherDetails I use a StudentID as the primary key...
1
3630
by: aajayaprakash | last post by:
Am so glad someone atleast wroteback ! I am trying to set up an attendance register where time someone comes into an office and leaves is recorded...a php based timecard/punchcard kind of thing. Ive got to get the mysql table to record the time in and time out and the ip address from which the person logged in or logged out each day. That is where the parse error is cropping up in file2 that i posted below. if...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.