Capture Current Values

  • Thread starter Thread starter Xero_inc
  • Start date Start date
X

Xero_inc

I have a form displaying data from a table. I would like to capture the
current data in some variables before the user is allowed to make any changes
on the form. Once the user makes changes, I would like to compare the current
values to old values stored in variable and accordingly update/insert records
in another table.

Please reply only if you can provide some code snippets.

Thanks,
 
If Me.txtWhatever = Me.txtWhatever.OldValue Then
'DoSomething
End If

The OldValue property on a bound control is the value you are looking to
compare. If you need to maintain that value farther than the current
subroutine, create a public form level variable to hold it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top