Solved

locked table run-time error 3211

Posted on 2001-08-17
14
213 Views
Last Modified: 2012-05-04
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
Comment
Question by:pcdaveh
  • 5
  • 4
  • 3
  • +2
14 Comments
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6398722
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
 
LVL 12

Expert Comment

by:Paurths
ID: 6398723
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
 

Author Comment

by:pcdaveh
ID: 6398740
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
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6398775
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
 

Author Comment

by:pcdaveh
ID: 6398776
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
 
LVL 12

Expert Comment

by:Paurths
ID: 6398813
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
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6398818
Ouch!  You've got to take it easy on that keyboard!  I broke my wrist before, 4 months in a cast!
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 12

Expert Comment

by:Paurths
ID: 6398837
dont read tooooo fast, as i'm typing with my left hand only, which is pretty slow.............
0
 

Author Comment

by:pcdaveh
ID: 6398884
I'm hanging it up 'til Monday!  Have a good weekend Fellas!
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6398912
good weekend to u too pcdaveh, and u PsychoDazey,

cheers
Ricky
0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6400580
Same to you all.  Get some rest paurths
0
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6458948
any luck pcdaveh?
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6990410
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
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 6990442
As per request, this question will be placed in PAQ, and points refunded.

Regards,
ComTech
CS Admin @ EE
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now