Recent content by TheShed

  1. T

    Time calculation problem

    Hi there folks, I am trying to calulate the number of hours an employee has worked based on the start and finish times that the user inputs to a form using the following code:- startTime = txtstartTime.Value finishTime = txtfinishTime.Value hoursWorked = [finishTime] - [startTime] Now this...
  2. T

    INSERT Problem

    That get rids of the error message, but the record still doesn't insert. Any ideas? My code is now:- CurrentDb.Execute ("INSERT INTO Jobs (startTime, finishTime, hoursWorked, description, mechanicID, nonProductive) VALUES ('" & txtstartTime.Value & "', '" & txtfinishTime.Value & "', '" &...
  3. T

    INSERT Problem

    I am trying to insert a record into a table using the following code:- CurrentDb.Execute ("INSERT INTO Jobs (startTime, finishTime, hoursWorked, description, mechanicID, nonProductive) VALUES ('" & txtstartTime.Text & "', '" & txtfinishTime.Text & "', '" & txthoursWorked.Text & "','" &...
  4. T

    Calculating Times

    Excellent. So simple! thanks so much :)
  5. T

    Calculating Times

    I am trying to calculate the difference between the start time of a job and the finish time. I am using the following:- Dim worked As Date worked = DateDiff("h", [startTime], [finishTime]) / 24 Which is fine when the time worked is a full hour. Some jobs can be 30 minutes though and using...
  6. T

    New to VBA - some help needed!

    Yes it is the only field. Well there is the mechanicID too, but I set that to an autonumber when I designed the table. Thanks though, I will have other forms where that are more that one field being added, so thats a good tip :)
  7. T

    New to VBA - some help needed!

    That was it, thanks mate! :)
  8. T

    New to VBA - some help needed!

    Hi thanks for replying. You are right, the reason I want to use VBA is because I don't want some standard Access error message. The people who will be using it are not very computer-literate and I want it to be as simple and user-friendly as possible. Also, some of the other forms I will...
  9. T

    New to VBA - some help needed!

    Hi all, I am new to this fourm and new to VBA. I have been asked to develop a small database for my company. It's nothing big really and I'm sure an experienced VBA programmer could have it built in no time. Unfortuanatly, I am not one of those, but I am taking this on so I can learn a bit of...
Back
Top Bottom