Carrying Previous Value into next Record (1 Viewer)

Steven.Ashby82

Registered User.
Local time
Today, 06:57
Joined
Jan 14, 2013
Messages
63
Hi All,

I've attached my DB in a hope to make things clearer.

I want the "Technician" & "Date" Field's to remember the last value when a new record is started. i.e If John has 20 jobs to input he doesn't need to set his name and date every time?

The reason for this database is to improve report functionality as each staff member previously completed a job sheet at the end of the day in Excel. The problem with that method is every day everybodys reports have to be colated into one sheet and then at the end of the month the statistics have to be stripped from that.

I want to try and keep the process as quick as possible for the staff members whilst being able to utilise the report functions fully at the end.

Is it possible to also only show in the table below in the split view just the records entered based on the "technician" and the "Date" i.e filtering of some sort.

A total of about 10 People will use this in total.

Thank you.
 

Attachments

  • Database1.accdb
    568 KB · Views: 97

boerbende

Ben
Local time
Today, 07:57
Joined
Feb 10, 2013
Messages
339
Recently I solved this in a form. The users were entering data, but each time the had to enter date, time, trolleynumber to the next record which were similar.

I placed a duplicatebutton on a sub form behind the record they were entering. When they were ready and needed the information in the next record, they can use the duplicatebutton

Code in the button
Private sub duplicaterecord

Dim copyvalue as string
on error goto endsuberr

Copyvalue =Me.FieldOnYourForm.value
Docmd.GoTorecord, , acnewRec
Me.FieldOnYourForm.value = Copyvalue

endsuberr:

end sub
 

MarkK

bit cruncher
Local time
, 22:57
Joined
Mar 17, 2004
Messages
8,193
Check out the DefaultValue property of the Textbox or Combobox controls. What you can do is set this property in the AfterUpdate event handler of the said control, and then that setting with appear as the default in any new records.
hth
 

Steven.Ashby82

Registered User.
Local time
Today, 06:57
Joined
Jan 14, 2013
Messages
63
Recently I solved this in a form. The users were entering data, but each time the had to enter date, time, trolleynumber to the next record which were similar.

I placed a duplicatebutton on a sub form behind the record they were entering. When they were ready and needed the information in the next record, they can use the duplicatebutton

Code in the button
Private sub duplicaterecord

Dim copyvalue as string
on error goto endsuberr

Copyvalue =Me.FieldOnYourForm.value
Docmd.GoTorecord, , acnewRec
Me.FieldOnYourForm.value = Copyvalue

endsuberr:

end sub

Do you have an example of how this works, also would this change records if you were just navigating through?
 

pr2-eugin

Super Moderator
Local time
Today, 06:57
Joined
Nov 30, 2011
Messages
8,494
Hello Steve, as lagbolt suggested setting Default Value is how you would go about doing this.. Simple and easy.. However you could also follow Allen Browne's method of "Assigning Default Value of Last record",
You can use the code without understanding how it works, but the point of this website is help you understand how to use Access.
So try to get a basic understanding of how it works..

I normally use a totally unconventional method (that's just me), but I use a Click of a button to go to a New record carried over.. So it depends how you wish to create a new record..
 

Steven.Ashby82

Registered User.
Local time
Today, 06:57
Joined
Jan 14, 2013
Messages
63
Paul could you detail your method, I'm not following how to do this still?

Or anyone

Thank you
 

pr2-eugin

Super Moderator
Local time
Today, 06:57
Joined
Nov 30, 2011
Messages
8,494
How do you go to a new record? Click of a button? BTW, which form are we addressing here?
 

Steven.Ashby82

Registered User.
Local time
Today, 06:57
Joined
Jan 14, 2013
Messages
63
Sorry Paul, the form all this is for is the one called JobSheet

I don't know what the hell is going on but I don't seem to be able to get anything to work. Everything just keeps kicking up errors.
 

Users who are viewing this thread

Top Bottom