473,326 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

DAO Recordset: Getting by dirty records

Megalog
378 Expert 256MB
Hey all, I have a minor issue I'm trying to figure out (using Access 2007).

I'm using a DAO recordset to update a table ("Writeups"), with the results of a bunch of functions I've written up over the last few days. It all works great, except that when we run it while employees are logged in, there's the possibility of a write conflict on their end if they happen to be working on the form.

Is there a way for me to detect if that record is currently open elsewhere? I understand the 'dirty' event is a form-level property, so I wouldnt be able to actually see if someone has changed anything on the client side before they saved the record.

Ideally we want to avoid the end user getting the write conflict dialog box by skipping the update to that record during this recordset procedure.
These are the variations I have tried so far with no luck:

Expand|Select|Wrap|Line Numbers
  1. Set rstBatchSeek = CurrentDb.OpenRecordset("Writeups", dbOpenDynaset)
  2.  
  3. Set rstBatchSeek = CurrentDb.OpenRecordset("Writeups", dbOpenDynaset, dbSeeChanges)
  4.  
  5. Set rstBatchSeek = CurrentDb.OpenRecordset("Writeups", dbOpenDynaset, dbSeeChanges, dbPessimistic)
The dbSeeChanges value sounds like the answer to this, but it didnt do anything different.
From the help file: dbSeeChanges - Generates a run-time error if another user is changing data you are editing (dynaset-type only).

Any tips would be appreciated!
Jan 18 '08 #1
2 3027
Delerna
1,134 Expert 1GB
Maybe you could arrange the users database to update a flag to value 1 when they move to a record and back to 0 when they leave it

Your update routine could then exclude everything that has the flag set

Just a suggestion ???
Jan 18 '08 #2
Megalog
378 Expert 256MB
Maybe you could arrange the users database to update a flag to value 1 when they move to a record and back to 0 when they leave it

Your update routine could then exclude everything that has the flag set

Just a suggestion ???
I had considered that.. but our form is set up to save a copy of the current record to a history table whenever a user makes a change and saves the record. If I implement that flag, then everytime a user simply cycles through the records they would be creating a history trail.

This is a split db btw.
Jan 18 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Andie | last post by:
Hello All, How would I go about using a disconnect recordset and select (x) records from it, x being the number of records to be selected. Many thanks in advance. -- Andie
15
by: U N Me | last post by:
I have a continuous form that lists records from a query. One of the columns is an amount field, In the footer of the form I place a text box that displays the total (sum) of the amount. The...
5
by: Simone | last post by:
Hello I hope you guys can help me. I am very new to ADO... I am creating a ADODB connection in a module and trying to access it from a command button in a form. Function fxEIDAssgn(plngEID As...
22
by: Gerry Abbott | last post by:
Hi all, I having some confusing effects with recordsets in a recent project. I created several recordsets, each set with the same number of records, and related with an index value. I create...
2
by: Sunil Korah | last post by:
I am having some trouble with opening recordsets. I have used code more or less straight from the access help. But still I am getting some errors. I am unable to work out what exactly I am doing...
13
by: Jan | last post by:
Hi I have a database that I use to keep track of the sales promotions that we send to companies. I normally send a mailing based on a subset of the companies in the database (found using the...
3
by: ruomingxu | last post by:
I have a problem with recordset/SQL statement. The following is the code. Private Sub Command1_Click() Dim SqlQuery As String Dim RcdSet As Recordset Dim cnt As Integer SqlQuery = "SELECT *...
10
by: shubha.sunkada | last post by:
Hi, I have a recordset connection in asp that I am using to search records.If I use the client side cursorlocation (rs.cursorlocation=3) then it takes really long to return back the records due...
2
by: phill86 | last post by:
Hi, i have a recordset that updates a table which works fine when you add, update and paste a single record but if you try and paste multiple records it will only update the table with the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.