Need Control Value entered in New REcord - How can I get

jim may

Well-known Member
Joined
Jul 4, 2004
Messages
7,486
I'm creating a tracking system (Access 2013) and while adding a New Record within a Form
how can I capture a field/control (textbox) to a variable before the value is actually saved in the control or the database?

Thanks in Advance --- Jim
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Actually I solved the Original problem myself by using code line.... NewValue = [Forms]![frmEquipmentAddsEdit].[Nomenclature].Value --- Closed!!!

But here's another problem...

Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
Call AuditChangesNewOrDelete("Nomenclature", "NEW")
Else
' I am only tracking the change of 4 fields (if any one or all get changed by the user) could someone provide proper syntax for #1 of the 4 line items next?

'Help starting here:

If my Control1.name ("Nomenclature") is "edited" then Call AuditChanges(Control1, "EDIT")
If my Control2.name ("CurrStat") is "edited" then Call AuditChanges(Control2, "EDIT")
If my Control3.name ("Quantity") is "edited" then Call AuditChanges(Control3, "EDIT")
If my Control4.name ("Location") is "edited" then Call AuditChanges(Control4, "EDIT")

'Help ending here:

End If
End Sub

Any assistance appreciated... Jim May
 
Upvote 0

Forum statistics

Threads
1,215,516
Messages
6,125,285
Members
449,218
Latest member
Excel Master

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