P
Patrick
HI!!
I want to delete a record via a button on one of my forms
and this is the VBA code behind it:
*****************************
Call GetAppPath ' gets the path
Set dbs = OpenDatabase(Path)
Set rsnew = dbs.OpenRecordset("SELECT * " _
& " FROM " & tableName & " " _
& " WHERE so_code=" & code & " and FY='" & fyr & "' " _
& " and ID=" & Ide & "")
With rsnew
..Delete
End With
Application.RefreshDatabaseWindow
DoCmd.GoToRecord , , acPrevious
*********************************************
UP TO HERE everything is working.
The part that's not working is this:
Once the focus is given to the previous record available,
If I press the 'Goto Last Record' in the navigation bar,
its allows me to go there and the form as 'DELETE' writen
in all of my fields. I DON'T want that.My last record
should be the same one that my 'Previous' code his know
pointing towards.
Can You help me make sense of this...
Patrick..
I want to delete a record via a button on one of my forms
and this is the VBA code behind it:
*****************************
Call GetAppPath ' gets the path
Set dbs = OpenDatabase(Path)
Set rsnew = dbs.OpenRecordset("SELECT * " _
& " FROM " & tableName & " " _
& " WHERE so_code=" & code & " and FY='" & fyr & "' " _
& " and ID=" & Ide & "")
With rsnew
..Delete
End With
Application.RefreshDatabaseWindow
DoCmd.GoToRecord , , acPrevious
*********************************************
UP TO HERE everything is working.
The part that's not working is this:
Once the focus is given to the previous record available,
If I press the 'Goto Last Record' in the navigation bar,
its allows me to go there and the form as 'DELETE' writen
in all of my fields. I DON'T want that.My last record
should be the same one that my 'Previous' code his know
pointing towards.
Can You help me make sense of this...
Patrick..