Hi,
I have bee plague with this problem for months now and my head is about to explode. All I want is to be able to update the last line in a table list. But here is the catch, It must be done at the click of a button at anytime during the construction of the list. Here is a sample of the code that I am working on that is suppose to give a strong sense of what I am doing.
Private Sub Return_Click()
Dim strnumber As String
Text34.Value = Val(ClipBoard_GetData)
strnumber = Text34.Value
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Transactions SET UnitPrice = '" & strnumber & "', Autonumber = " & DMax("[TransactionID]", "Transactions") + 1
DoCmd.SetWarnings True
End Sub
Can anyone please help?
If there is anyone who can fix this code -- that will be great. Thank you.
~~~~~~~~~~~~
James
I have bee plague with this problem for months now and my head is about to explode. All I want is to be able to update the last line in a table list. But here is the catch, It must be done at the click of a button at anytime during the construction of the list. Here is a sample of the code that I am working on that is suppose to give a strong sense of what I am doing.
Private Sub Return_Click()
Dim strnumber As String
Text34.Value = Val(ClipBoard_GetData)
strnumber = Text34.Value
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE Transactions SET UnitPrice = '" & strnumber & "', Autonumber = " & DMax("[TransactionID]", "Transactions") + 1
DoCmd.SetWarnings True
End Sub
Can anyone please help?

If there is anyone who can fix this code -- that will be great. Thank you.
~~~~~~~~~~~~
James