Updating field question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create some shortcuts for entering data. I seem to have run
into a
problem.I would like to be able to enter a value in a text box, hit 'D' and
then the value of the text boxis calculated based on the original entry.

I have this:

If KeyAscii = Asc("D") Or KeyAscii = Asc("d") Then
discount = Me.Allowed
Me.Allowed = Me.FEE - discount
discount = 0
KeyAscii = 0
End If

and it works perfectly IF the number is already there. However, if the
field is
ZERO, then I type a new number then hit R, I get a response suggesting that
Access
has not 'updated' the value. So, how do I force Access to update the field
with the
new value when I hit R?

Thanks
 
Save the record first using:

DoCmd.RunCommand acCmdSaveRecord
 

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