locked recordset in a single user environment

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a locking problem with an entire table. I am
using Access 2002 and creating a project management app
for a lighting company. I have about 8 levels of parent
to child relationships and I have been able to make them
work but the client wants me to also create a library of
certain records that can be imported into a site/client
set.

I can create the library, I can append the records (it's
a five level append) but, when I go to edit the top table
of the append in a form the entire table locks up. If I
close the application and re-open it works fine. If I
run the update (it's all in code) without the append it's
fine. If I manually add records it's fine but once I've
appended and then try to update in code it locks.

I've removed the table as an underlying record source
from all my forms and refer to it only in code. I've
tried everything I can thing of but I still get the error.

a snipped looks like this
strsql = "SELECT tblMeasures.* " & _
"FROM tblMeasures " & _
"WHERE (((tblMeasures.Measure_id)=" & lngMeasureId & "));"

Set myrecs = CurrentDb.OpenRecordset(strsql,
dbOpenDynaset)
If myrecs.BOF And myrecs.EOF Then 'add a rec to fixtures
and go get it
'put code here
Else
myrecs.MoveFirst
'fill in fields

'get the controls
For y = 0 To Me.Controls.Count - 1
strControlName = Me.Controls(y).Name
For x = 0 To myrecs.Fields.Count - 1
If strControlName = myrecs.Fields(x).Name Then
myrecs.Edit
myrecs.Fields(x) = Me(strControlName)
myrecs.Update
Exit For
End If
Next x
Next y
End If

myrecs.Close

Here I am filling in unbound values from a form into the
table.

If you have any ideas please let me know. I'm way over
budget now and at my wits end.

Thanks,

Joanne
 
Have been here myself. There is something still attached
to a table. You will have to try setting recordsets to
null. detaching recordsources from forms etc. You'll find
it.
 
Hi,

That's helpful but I've never set recordsets to null before. I have detached the table as an underlying source from any form.

so it's something like
Set Myrecs = null

??

I'll try it.

Thanks,

Joanne
 
Hi,

I couldn't post from the regular forum.

I appreciate the answer but what is the syntax for setting the
recordset to null. I tried set myrecs = null but created an error.
Any help would be appreciated.

Thanks,

Joanne
 
Set myrecs = Nothing

Joanne said:
Hi,

I couldn't post from the regular forum.

I appreciate the answer but what is the syntax for setting the
recordset to null. I tried set myrecs = null but created an error.
Any help would be appreciated.

Thanks,

Joanne


<[email protected]> wrote in message
 
Back
Top