Current Date and time in a form when record is created

haylau

New Member
Joined
Dec 3, 2018
Messages
18
We are considering switching from MS Access to Excel for a simple (??) time logging system

Using our access database, when a worker starts a new part of a job they go to the computer, grab the barcode scanner. They scan their name, the process the are embarking on (e.g Bending, or threading) they then scan the job number of the job they are working on. A record is then created and the record creation time is automatically added to the record. We use the time to calculate how lon a particular job has been worked on for our costings

So looking at excelI can see we can build a table, and use a form for data entry. So the process is identical- BUT i cannot think how to put the current date and time into the record automatically.

Any ideas? (See screen shot for more details)

05-02-2019%2013-05-47.png

05-02-2019%2013-05-47.png
05-02-2019%2013-05-47.png
https://www.dropbox.com/s/keixdzt5u04drv9/05-02-2019 13-05-47.png
 
That is great thanks. For this line: ws.Cells(newRow, 4).Value = Me.TextBox2.ValueI can change that to ws.Cells(newRow, 4).Value = Now

So then i don't need the "time" box at all. As soon as the record is created that field is updated at the time of record creation without having to "update". Perfect
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
.
Changing the one line of code as you outlined is accurate.

Glad it works as desired.

May I suggest .. if the employees were able to scan the information previously .... not having that ability now will most likely be frustrating to them.
It will seem in their minds the time it takes type the data will be tiresome. A reason to also include the bar scanning which another member has indicated
he can assist with.

Of course if they are not scanning now ... disregard the above.

I'm curious .. how many different PROCESS's ... STAFF ID's ... JOB ID's are there to choose from ?
 
Upvote 0
They will still be able to scan. The handheld barcode scanners basically just act like a keyboard as far as excel is concerened.

No, I am more than happy with your solution.

A bigger problem now is what I do with the data after entering. On the database I could do some queries and calculations that would show how long each person worked on each job, and each process of the job. At this stage I am not convinced I can do that with Excel. But having fun trying :)
 
Upvote 0
.
You could add another field for time job complete.
 
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top