Hi! please help me.....

i just want to know what is the code for time record using ADODB connection. im so tired to get the right code for time attendance please help me... this is for my thesis....

Here's the command:
txtEmpID --- textbox
cmdGetdata --- command Button
lbltime --- label
lbldate --- label

here's the Database name "payroll" and the table is "tblDTR"

Fields in "tblDTR": 'EmployeeID', 'TimeIn','TimeOut','Dates'

for example, I input the employeeCode int txtEmpID then after that i click the cmdGetData..

so if i click the cmdGetdata the data in EmpID, lbltime and lbldate is move to tblDTR
so that is for the TimeIn...

then after to TimeIn the TimeOut is null so if i input the same EmployeeID in txtEmpID
the data in lbltime is move to TimeOut in the same row....

so after to complete the row, another Input again and another row.. that's all...

I hope all professional programmer's wants to help me...

Recommended Answers

All 11 Replies

You are tired of what ?

What have you tried ?

i tried to get the code for time attendance and i want to connect it into Fingerprint device so i want to know how to make it?! please help me?!

Do you have any code that you are working on ?

yes... here

if rs.recordcount = 0 then

yes here...

if rs.recordcount = 0 then
with rs
.fields("EmpID") = txtEmpID.text
.fields("TimeIn") = lblTime.caption
.fields("Dates") = lblDate.caption
rs.find "EmpID = '" + txtEmpID.text + "'"
rs.fields("TimeOut") = lblTime.caption

end if

my error is if recordcount is = 0? only one data can update into database MS ACCESS and if recordcount >=0?

the else statement can't read. so how to do?

Are you using a data control or code to create your recordset? It looks like a data cobtrol, which I do not believe in because of its basic functionality.

data control? no.. i using adodb connection

i want to get the flowing of time attendance using adodb vb6....

I think the way you are trying to implement is wrong.
The In and Out time entries should be independent of each other(not in the same row).

This is my personal opinion.

Your code will then read something like -

if rs.recordcount = 0 then
with rs
!EmpID = txtEmpID.text
!TimeIn = lblTime.caption
!Dates = lblDate.caption
rs.Open "SELECT * FROM tblDTR WHERE EmpID = '" + txtEmpID.text + "'"
rs!TimeOut = lblTime.caption
end if

any people can give me code for save time to access? pleasss

don't raise old threads
create a new thread for your problem and there we will try to solve the thread . . .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.