Last line

Trinb37

Registered User.
Local time
Today, 07:45
Joined
Oct 9, 2003
Messages
23
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?:eek:
If there is anyone who can fix this code -- that will be great. Thank you.



~~~~~~~~~~~~
James
 
You do realise that a table is an unordered set of records - what benefit will updating the "last" record provide?
 

Users who are viewing this thread

Back
Top Bottom