Records have become locked

G

Gelpaks

I created a form to add records to a db and it is accessed by clicking on an
"add new" button on the main form. All seemed to be working well until I
added a record. Now when I'm on the main form trying to go through the
records, every time I click to go to the next record, I get an error msg
saying the records are locked and I need to set locks to no locks. I have
checked both forms and the general Access options and the record locking is
set to no locks.
In the VB code, I originally set it to close the main form (when clicking on
the Add New button) and open the AddNew form, and there is an exit button on
the AddNew form that is coded to close that form and reopen the main form. I
commented out all the code thinking I messed something up with my coding, but
I still cannot go through the records on the main form. Any help you can
give me on this would be GREATLY appreciated!
 
G

Gelpaks

I'm not sure at all what you mean. I have a form that comes up and all the
data to be put on it comes from a single table (or rather goes into a single
table). How would I base this form on a query?
 
R

ruralguy via AccessMonster.com

Create a query that includes all of the fields of your table and then set the
query as the RecordSource of your form instead of the table.
I'm not sure at all what you mean. I have a form that comes up and all the
data to be put on it comes from a single table (or rather goes into a single
table). How would I base this form on a query?
Try basing your forms on queries rather than tables.
[quoted text clipped - 11 lines]
 
G

Gelpaks

The form is solely to add new records into the db, and is not to view or even
to edit. Please help me understand why I would want this form to be based on
a query and not the table.
Also, I still cannot view records in the main window. What is it that is
locking the records? And how can I fix the form so it won't give me the error
msg that the records are locked?

ruralguy via AccessMonster.com said:
Create a query that includes all of the fields of your table and then set the
query as the RecordSource of your form instead of the table.
I'm not sure at all what you mean. I have a form that comes up and all the
data to be put on it comes from a single table (or rather goes into a single
table). How would I base this form on a query?
Try basing your forms on queries rather than tables.
[quoted text clipped - 11 lines]
I still cannot go through the records on the main form. Any help you can
give me on this would be GREATLY appreciated!

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

Have you tried using a query instead?
The form is solely to add new records into the db, and is not to view or even
to edit. Please help me understand why I would want this form to be based on
a query and not the table.
Also, I still cannot view records in the main window. What is it that is
locking the records? And how can I fix the form so it won't give me the error
msg that the records are locked?
Create a query that includes all of the fields of your table and then set the
query as the RecordSource of your form instead of the table.
[quoted text clipped - 8 lines]
 
G

Gelpaks

Is that what it's going to take to unlock the records on my main form so I
can navigate through them w/o the error msg?

ruralguy via AccessMonster.com said:
Have you tried using a query instead?
The form is solely to add new records into the db, and is not to view or even
to edit. Please help me understand why I would want this form to be based on
a query and not the table.
Also, I still cannot view records in the main window. What is it that is
locking the records? And how can I fix the form so it won't give me the error
msg that the records are locked?
Create a query that includes all of the fields of your table and then set the
query as the RecordSource of your form instead of the table.
[quoted text clipped - 8 lines]
I still cannot go through the records on the main form. Any help you can
give me on this would be GREATLY appreciated!

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
G

Gelpaks

And Yes, I ran the form from a query and nothing changed - I still cannot
view the records w/o the error msg that the records are locked. Please help!

ruralguy via AccessMonster.com said:
Have you tried using a query instead?
The form is solely to add new records into the db, and is not to view or even
to edit. Please help me understand why I would want this form to be based on
a query and not the table.
Also, I still cannot view records in the main window. What is it that is
locking the records? And how can I fix the form so it won't give me the error
msg that the records are locked?
Create a query that includes all of the fields of your table and then set the
query as the RecordSource of your form instead of the table.
[quoted text clipped - 8 lines]
I still cannot go through the records on the main form. Any help you can
give me on this would be GREATLY appreciated!

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

Both forms should be running from a query. What version of Access are you
using and on what OS? If you do not open the AddRecord form can you scroll
through the records on the MainForm?
And Yes, I ran the form from a query and nothing changed - I still cannot
view the records w/o the error msg that the records are locked. Please help!
Have you tried using a query instead?
[quoted text clipped - 10 lines]
 
G

Gelpaks

I am running Office '07 on Windows XP Pro.
I had changed only the NewRecord form to run from a query, and was still not
able to scroll through the records on the main form whether I ever opened the
NewRecord form or not. Now that I've changed both forms to run from query, I
am not getting the "records are locked" msg. Can you help me understand just
what the difference is between running them from a table or from a query?
I've never run across this problem before and have always pulled the forms
from a table and not a query. Is there something different in Access '07
that would cause this?
When I first started this db and was delving into initial bkgd coding, I got
the msg that there were problems communicating with ole server or activex
control, and that took several hours of troubleshooting to get rid of! I had
not seen that error msg before and the fix for it involved taking out all my
coding and simply reinserting the "Option Compare Database" line. Am I in
for more of these error msg quirks in Access '07?

ruralguy via AccessMonster.com said:
Both forms should be running from a query. What version of Access are you
using and on what OS? If you do not open the AddRecord form can you scroll
through the records on the MainForm?
And Yes, I ran the form from a query and nothing changed - I still cannot
view the records w/o the error msg that the records are locked. Please help!
Have you tried using a query instead?
[quoted text clipped - 10 lines]
I still cannot go through the records on the main form. Any help you can
give me on this would be GREATLY appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top