473,603 Members | 2,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with locked records

Hey guys,
i'm kinda new with access, despite having worked with it all
summer. I'm getting an error with a vba function i wrote to take some
information from an access form and put it into a bunch of tables in
an access database. if i insert a bunch of break points and slowly
walk through everything there is no problem. But if i just run it i
get an error about trying to access a record that is locked by another
user i believe. It seems to mostly occur in a part of the function
that is a while loop that looks something like this
While Not IsNull(assetArr (currindex, CurrAccIndex))
Me.lstPOacc.Bou ndColumn = 1
CurrAccCLIN = Me.lstPOacc.Ite mData(CurrAccIn dex)
Me.lstPOacc.Bou ndColumn = 2
currAccPrice = Me.lstPOacc.Ite mData(CurrAccIn dex)

'Open recordset
With rs1
Set .ActiveConnecti on = conn
.Source = "accessory"
.LockType = adLockOptimisti c
.Open
End With

rs1.AddNew
rs1("accCLIN") = CurrAccCLIN
rs1("dateAdded" ) = Me.txtPoPstart
rs1("assetKey") = currAssetKey
rs1.Update
currAccKey = rs1.Fields("Acc ID")
rs1.Close

'add info to rel acc form
strSQL = "INSERT INTO rel_acc_form (AccID,FormID,c ost)
VALUES (" & _
"currAccKey & "," & currformid & "," &
currAccPrice & ");"
DoCmd.RunSQL (strSQL)

CurrAccIndex = CurrAccIndex + 1
Wend

but i think it may be happening in other places in the function as
well. Is access not finishing releasing a record before it tries to
use it again? is there something obvious i'm missing...sorry about
the weak code, i've been in kinda a rush.
thanks for any help you can give me,
Keith
Nov 13 '05 #1
0 1041

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1222
by: Ryan | last post by:
I have an SP which I use to insert into a table data from another. For example... INSERT INTO myWorkTable (Field1, Field2) SELECT myField1, myField2 FROM
3
1915
by: Oren | last post by:
Hi, I have an Access application with linked tables via ODBC to MSSQL server 2000. Having a weird problem, probably something i've done while not being aware of (kinda newbie). the last 20 records (and growing)of a specific table are locked - cant change them - ("another user is editing these records ... ").
5
6008
by: David C. Barber | last post by:
I'm trying to determine which user has locked a given record from VB6. I know I can use sp_lock and sp_who, and match up the data to determine which users have locked records in my database, however I haven't seen a way to match the specific user to the specific record. What am I missing here? Thanks! *David*
5
5452
by: Ritesh | last post by:
Hi All, According to my observation using SP_WHO2 in my database, some INSERT statements are getting blocked by SELECT statements. Though the blocking SELECT statement is having ReadPast hint, i think, it will only read past locked resources but will not guarantee the select statement itself not blocking other statements(in my case Insert). According to my knowledge
0
2208
by: surotkin | last post by:
Hi all! My code is causing a violation against the MaxLocksPerFile in the registry. I checked Microsoft Knowledge Base http://support.microsoft.com/default.aspx?scid=kb;EN-US;815281. It suggests increasing MaxLocksPerFile setting in registry by using DAO.DBEngine.SetOption dbmaxlocksperfile, 1500
3
2174
by: jamesgrady via AccessMonster.com | last post by:
Guys, I created a database about 2 years ago with about 30 tables and 60 queries, with a bunch of forms, and macros, and a whole heap of a lot of VB code. It was worked excellent until recently. Here's the problem........ The users are griping about not being able to update records when they are in the forms. Could the database be getting to large or something?......because
2
2777
by: Ron | last post by:
Hi All, Using WinXP pro/Access 2000. I have a database that's been used for about 5 months. Transferred lots of data from a dos based program, then the users have been using it for that 5 months. About 180000 records in one of the main files (maybe 25000 new since the dos conversion). Been having some speed issues crop up along the way (much faster to do same reports when I first transferred the data than now, with the new 25000...
6
4492
by: ljstern | last post by:
Hello. I am using MS Access 2003 with XP/pro. I have a form that has the following properties set through the property sheet: form: AllowAdditions = False CartridgeID field: Locked = True The AllowAdditions property is set so that the user can navigate through the records but not be able to begin a new record without clicking the New Record button. The ID field is locked so the user cannot change that field, while still being able to...
6
11319
by: stuart | last post by:
I have 2 users who ran into a problem with a data entry program (written in Access 2003). One user was keying into one of the forms when she got the message "ACCESS Error Number: 3218 Could not update; currently locked'. About the same time, another user was keying records into a 2nd form. Even though they were on different forms, they would have added records to the same table. The 2nd user had tried to add about 28 records, the...
0
7996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8060
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6735
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3951
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1514
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.