locked table run-time error 3211

I have a form that has a list box that is populated by a saved query.  I have two text boxes that accept date input and a refresh command button that requeries the table to populate the list box when dates are changed.  When I hit refresh the process is stopped because a the table is locked by the saved query.  How do i get around this problem?
pcdavehAsked:
Who is Participating?
 
ComTechConnect With a Mentor Commented:
As per request, this question will be placed in PAQ, and points refunded.

Regards,
ComTech
CS Admin @ EE
0
 
PsychoDazeyCommented:
What are your record locks set to on your table?  you may have to set them to no locks.  Also, you should use the requery method rather than the refresh.
0
 
PaurthsCommented:
Hi pcdaveh,

u can use a sql-statement to populate the listbox.

dim strSQL as string
strSQL = "Select FirstField, SecondField from YourTable where YourDate1 > #" & me.txtbox1 & "# and Yourdate1 < #" & me.txtbox2 & "#;"
me.ListBox.Rowsource = strSQL


clear?

Cheers
Ricky
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
pcdavehAuthor Commented:
I had previously embedded the SQL statement in the vba code as the row source to the list box.  I received the same errors.
0
 
PsychoDazeyCommented:
I am thinking you have your record locks option set to All Records.  I believe the table cannot be accessed at all with this option checked, but I've been wrong before and I'm sure I will again...right Ricky :-)
0
 
pcdavehAuthor Commented:
I had previously embedded the SQL statement in the vba code as the row source to the list box.  I received the same errors.
0
 
PaurthsCommented:
lol PsychoDazey, its been a long week for all of us... :-)
(but not for me, i've been home all week, and the next couple of weeks, broke my whrist last saturday  :-(  )

cheers
Ricky
0
 
PsychoDazeyCommented:
Ouch!  You've got to take it easy on that keyboard!  I broke my wrist before, 4 months in a cast!
0
 
PaurthsCommented:
dont read tooooo fast, as i'm typing with my left hand only, which is pretty slow.............
0
 
pcdavehAuthor Commented:
I'm hanging it up 'til Monday!  Have a good weekend Fellas!
0
 
PaurthsCommented:
good weekend to u too pcdaveh, and u PsychoDazey,

cheers
Ricky
0
 
PsychoDazeyCommented:
Same to you all.  Get some rest paurths
0
 
PsychoDazeyCommented:
any luck pcdaveh?
0
 
nico5038Commented:
for pcdaveh

It's time to clean up this TA, so I will leave a recommendation in Community Support that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.