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
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