Time-in/Time-out syntax

Hi All!
I am building a VB presentation project of school, and one of my forms is a time-in/time-out for employees=2E It has buttons for in and out, and a data box to display the times and date=2E It is databased, but I can't seem to find syntax/code to write the functions=2E I need it to update for each employee when it displays at time-in and time-out=2E Any help, or suggestions would be appreciated! It is being made in a VB 6=2E0 project=2E Thanks! Diehl, James
jms_diehl@sbcglobal=2Enet

User will log into program (if security needs to be set), and when
they clock in or out, it will put a row into the clocking table with
their userid, date/time, and nature of clock (in or out)

Then, you can run a report showing when they clocked in and out, and
how long they were clocked in (out - in) or you can display a listview
/ datagrid that they can export to excel

A few things to keep in mind, if they clock in, grab their last action
(select top 1 ClockType from clocking where userid =3D '" & scurrentUserID
& "' order by ClockDateTime desc) If the last action was
clocking in, remind them they are already clocked in.

Thanks!
Yes, we are using VB 6 with Access in class. We have
been designing the databases in Access, then linking
them to the VB program. We have already made the
database, but need to edit some items. One of our
team members has taken C+ classes, some SQL and .Net,
but can't remember the proper syntax. So much of it
will not work in VB 6.0, that it makes it difficult to
code. The VB 6 shows a timer in the toolbox for
timing the work, but our book only gives a tip for
time/date/stamp function, no code. We need the
display box to show the time for the time-in, and the
date. It needs to be updatable each time, and for
each employee. Then, when they time-out, it needs to
show the time and date, and be update when they do.
Example: Fred pushes time-in button
Displays: Fred Jones 01/20/2006
10:54
Time-out: Fred Jones 01/20/2006
4:30
It needs to update the date and time each time he
times-in and out
and also the same for any other employee. Our C+ man
says the big problem is entering integers and
variables to the code. It can be done in C+ and .Net,
but we don't have any examples to use in the VB 6.0
book. Our teacher says she's not sure if it can be
done!

Firstly, you have an employee 'Fred Jones' but how do you determine that it
is 'Fred Jones' and not 'Freddy Jones' or some other employee?

If you do not have to do any calculation, all you need to do is to capture
the current DATE and TIME, and you have to determine how you want to
represent it in the database, as the ACCESS DATE/TIME field is not 100%
matching with that of VB6's. As such, you may want to capture Date and Time
seperately for each employee's IN and OUT.

-Al
Ps- disregard the Timer control, you have no need for it, since if you
ever need to keep track of the time in between In & Out, you can just do
a calculation (datediff is the function name) on the two textboxes you
already have)

Thanks for the help!
Our group needs to get together at school, and try it
out to see what works. It's amazing how one little
line can sometimes make you bang your head on the
wall! We have 7 or 8 forms to finish the code on, and
link it to our PowerPoint presentation for a final in
VB before we can start on GUI's. I may be back for
more help!
Diehl, James CNS & IT Student, ITT Technical

Many, many thanks!
I just installed 2005 VB on my home computer, and I'm
trying to learn the code conversions on my own. I
tried to reword some of it to use in VB 6, but 6 just
kind of gives me the DUH! look when I try! All those
"byVal's" and stuff makes 6.0 do the deer in the
headlights look. I'm sure I'll be back for more help!
I think we are trying to do something that either
confusing our instructor, or she simply can't say yes
or no because it is our final project for the class.
She's kind of saying "you're on your own, don't ask
me!"
Diehl, James
CNS & IT Student, ITT Tech.

When the VB project starts up, the first form that
shows is a employeeID/Password form. They have to
enter a preassigned password (for the demonstration)
that recognizes them as say: Fred Jones, who is listed
on the Access database. If he types in the right
password, the time-in form displays. He can push the
time button, and it will show his name, the time and
date he timed in at. That form has a menu bar where
you can click next, or (if we want to) instead, the
main form will open, and the time-in closes. At the
end of the last form, there will be two menu/sub-menu
choices of ShowAbout Form, and Back (we haven't
decided yet!). Back would send the focus back to the
time-in/time-out form, where you can time-out, then
exit/menu to exit the demonstration. We just need to
decide on those options, then write the code. We
still have about two weeks to get it done!
Thanks! Diehl, James

Corey-
Yes, you are right. I take it you're a professional programmer like
most of us, or at least an enthusiast, otherwise you wouldn't be on this
forum. Correct? Now, think about how you got into programming. Did
you take classes (and do homework)? Did you ask questions? I don't
know about you, but I wasn't born with, nor did I wake up one morning
with everything I know about programming in my head mysteriously. I
took classes, and asked questions. People helped me, and for that, I
owe them a great debt of gratitude.

Jim is on his way to becoming a programmer, and admittedly, fairly new
to it. Yes, he admitted it was for homework. But he didn't come out
and say "can someone write my homework for me since you're all so good
at it", he simply asked a question. Perhaps his question was a little
too broad, but everyone starts somewhere. I know I started with
absolutely no knowledge, and I know you did also.

Thanks dingaroo!
The teach said we could use different sources of info.
for our project, and our book. The book doesn't have
enough variety to help, or it's just not advanced
enough. Plus, the issue has so many errors in the
code that's listed in it, that we've had problems all
through the term trying to make our projects work.
You spend 45min. to an hour making forms and writing
code, then 2 or 3 hours, trying to correct the errors.
Diehl, James