Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

List Box transaction

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank Dulk - 24 May 2008 15:53 GMT
I have a List Box to which I attribute a recordset to the property recordset
of the same because I want to use transactions, until there everything ok.

The problem happens when I update recordset, same giving requery in the list
box, he doesn't exhibit the updated data. Which is the solution for this
case? Only to reaffirm that my intention of " feeding " the list box with
the recordset is so that I can use transactions.

Option Compare Database

Dim wks As DAO.Workspace
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim rsdel As DAO.Recordset

Private Sub Comando11_Click()

' Aquí eliminates the alterations and it shows the data
wks.Rollback
Lista9.Requery
End Sub

Private Sub Comando2_Click()

' Aquí adds the data in the rs

With rs
.AddNew
![tst] = "Dado!!"
.Update
End With

' Aquí should exhibit the data
Lista9.Requery
End Sub

Private Sub Form_Load()

' Here it attributes the rs to the list and it begins the transaction
Set wks = DBEngine.Workspaces(0)
Set db = OpenDatabase(CurrentDb.Name)
Set rs = db.OpenRecordset("SELECT * FROM TstTransTemp;")

Set Lista9.Recordset = rs

wks.BeginTrans

End Sub

A hug,
Allan Murphy - 25 May 2008 02:55 GMT
Frank

You will need to save your record then use the Got Focus of your  List box
to Requery.

Allan

>I have a List Box to which I attribute a recordset to the property
>recordset of the same because I want to use transactions, until there
[quoted text clipped - 47 lines]
>
> A hug,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.