Hi,
Is there anyone who can help me with this problem? I am at my wits end trying to figure out how to make the query code update the last line inthe table database. This is the code that I used:
Private Sub Return_Click()
Dim strnumber As String
Text34.Value = Val(ClipBoard_GetData)
strnumber = Text34.Value
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdRecordsGoToLast
DoCmd.RunSQL "UPDATE Transactions SET UnitPrice = '" & strnumber & "' WHERE TransactionID =4 "
DoCmd.SetWarnings True
End Sub
The code works fine is just that I can not get it to update the last line. I can update anyother line by just putting a number in the criteria section of the code, but not the last line. I am open to any suggestion. Thank you in advance.
James
Is there anyone who can help me with this problem? I am at my wits end trying to figure out how to make the query code update the last line inthe table database. This is the code that I used:
Private Sub Return_Click()
Dim strnumber As String
Text34.Value = Val(ClipBoard_GetData)
strnumber = Text34.Value
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdRecordsGoToLast
DoCmd.RunSQL "UPDATE Transactions SET UnitPrice = '" & strnumber & "' WHERE TransactionID =4 "
DoCmd.SetWarnings True
End Sub
The code works fine is just that I can not get it to update the last line. I can update anyother line by just putting a number in the criteria section of the code, but not the last line. I am open to any suggestion. Thank you in advance.
James