Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

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?
0
pcdaveh
Asked:
pcdaveh
  • 5
  • 4
  • 3
  • +2
1 Solution
 
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
 
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
ComTechCommented:
As per request, this question will be placed in PAQ, and points refunded.

Regards,
ComTech
CS Admin @ EE
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 5
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now