Connecting Tech Pros Worldwide Forums | Help | Site Map

RecordLocks In Access - Stuck here.

Member
 
Join Date: Mar 2007
Posts: 48
#1: Mar 26 '07
Hi,

I am completely new to Access. Here is something that I am experiencing...

I have this form and I search for candidate. Whatever results I get, I try to navigate from one to another and it gives me this error -

Access can't apply the filter because all records are locked.

I have set the Advanced Property (in Tools Menu --> Options) of Locking as No Lock but it is still the same. Please help.

Thanks.

msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#2: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

Hi,

I am completely new to Access. Here is something that I am experiencing...

I have this form and I search for candidate. Whatever results I get, I try to navigate from one to another and it gives me this error -

Access can't apply the filter because all records are locked.

I have set the Advanced Property (in Tools Menu --> Options) of Locking as No Lock but it is still the same. Please help.

Thanks.

What is the record source of the form you are using?
Member
 
Join Date: Mar 2007
Posts: 48
#3: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

What is the record source of the form you are using?

I know I am dumb to ask this but how do you find that? I am really new.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#4: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

I know I am dumb to ask this but how do you find that? I am really new.

Open the form in Design View. Open the properties of the form. Under the Data tab there is a property called Record Source. While you're there check the property of the filter also.
Member
 
Join Date: Mar 2007
Posts: 48
#5: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

Open the form in Design View. Open the properties of the form. Under the Data tab there is a property called Record Source. While you're there check the property of the filter also.

Record Source is Candidate
Filter field is empty.

Is Candidate table locked? That is what you mean?
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#6: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

Record Source is Candidate
Filter field is empty.

Is Candidate table locked? That is what you mean?

No I think your only problem is your searching. When you search you apply a filter to show only the record(s) you are searching for. You will have to remove the filter to continue to navigate through the records. How are you seaching the form?
Member
 
Join Date: Mar 2007
Posts: 48
#7: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

No I think your only problem is your searching. When you search you apply a filter to show only the record(s) you are searching for. You will have to remove the filter to continue to navigate through the records. How are you seaching the form?

I got this -

Hope this helps. There is an [Event Procedure] in After Update properties.

Expand|Select|Wrap|Line Numbers
  1. Private Sub SelectIDNo_AfterUpdate()
  2.     Me.Filter = ""
  3.  
  4.     If Not IsNull(Me.SelectIDNo) Then
  5.         Me.FilterOn = True
  6.         Me.Filter = "[SSNo] LIKE '" + Forms![AO_ViewEditCandidateData]![SelectIDNo] + "*'"
  7.     Else
  8.         Me.FilterOn = False
  9.     End If
  10.  
  11.     Me.SelectIDNo = ""
  12. End Sub
  13.  
  14. Private Sub SelectLastName_AfterUpdate()
  15.  
  16.     Me.Filter = ""
  17.  
  18.     If Not IsNull(Me.SelectLastName) Then
  19.         Me.Filter = "[LastName] LIKE '" + Forms![AO_ViewEditCandidateData]![SelectLastName] + "*'"
  20.         Me.FilterOn = True
  21.     Else
  22.         Me.FilterOn = False
  23.     End If
  24.  
  25.     Me.SelectLastName = ""
  26. End Sub
  27.  
Thanks- I do need to filter these results say based on SSN.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#8: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

I got this -

Hope this helps. There is an [Event Procedure] in After Update properties.

Expand|Select|Wrap|Line Numbers
  1. Private Sub SelectIDNo_AfterUpdate()
  2.     Me.Filter = ""
  3.  
  4.     If Not IsNull(Me.SelectIDNo) Then
  5.         Me.FilterOn = True
  6.         Me.Filter = "[SSNo] LIKE '" + Forms![AO_ViewEditCandidateData]![SelectIDNo] + "*'"
  7.     Else
  8.         Me.FilterOn = False
  9.     End If
  10.  
  11.     Me.SelectIDNo = ""
  12. End Sub
  13.  
  14. Private Sub SelectLastName_AfterUpdate()
  15.  
  16.     Me.Filter = ""
  17.  
  18.     If Not IsNull(Me.SelectLastName) Then
  19.         Me.Filter = "[LastName] LIKE '" + Forms![AO_ViewEditCandidateData]![SelectLastName] + "*'"
  20.         Me.FilterOn = True
  21.     Else
  22.         Me.FilterOn = False
  23.     End If
  24.  
  25.     Me.SelectLastName = ""
  26. End Sub
  27.  
Thanks- I do need to filter these results say based on SSN.

These filters control the records available to the form. Why do you need to navigate from the searched record. A button to return all records and remove all searches could be implemented.
Member
 
Join Date: Mar 2007
Posts: 48
#9: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

These filters control the records available to the form. Why do you need to navigate from the searched record. A button to return all records and remove all searches could be implemented.

I am just search records from a given table, and getting some records. I wnt to navigate those returned records from the original recordset. But when I navigate I get this error. That is when I jump frm one record to another (in the returned recordset) I get this error. Other wise, in the original set, it navigates fine.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#10: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

I am just search records from a given table, and getting some records. I wnt to navigate those returned records from the original recordset. But when I navigate I get this error. That is when I jump frm one record to another (in the returned recordset) I get this error. Other wise, in the original set, it navigates fine.

You must not be returning the number of records you think you are. In the navigation buttons on the bottom of the form it should say 1 of X (Filtered). The X represents the number of records being returned by the filter.
Member
 
Join Date: Mar 2007
Posts: 48
#11: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

You must not be returning the number of records you think you are. In the navigation buttons on the bottom of the form it should say 1 of X (Filtered). The X represents the number of records being returned by the filter.

yes it says, 1 of 3 filtered. Also, if I click OK in the error popup the record jumps to next one but the error always pops up.

Thanks for your help. I really appreciate your efforts.
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#12: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

yes it says, 1 of 3 filtered. Also, if I click OK in the error popup the record jumps to next one but the error always pops up.

Thanks for your help. I really appreciate your efforts.

Comment out the lines reseting the textboxes.
Expand|Select|Wrap|Line Numbers
  1. 'Me.SelectIDNo = ""
and see if that makes any difference.

Mary
Member
 
Join Date: Mar 2007
Posts: 48
#13: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

Comment out the lines reseting the textboxes.

Expand|Select|Wrap|Line Numbers
  1. 'Me.SelectIDNo = ""
and see if that makes any difference.

Mary


Nothing. Still same error and behaviour. :(
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#14: Mar 26 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

Nothing. Still same error and behaviour. :(

Is there any code in the forms events like the on current or on change event?
Member
 
Join Date: Mar 2007
Posts: 48
#15: Mar 27 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

Is there any code in the forms events like the on current or on change event?

No. All I could see is BeforeUpdate and AfterUpdate events. And some print events for printing?

Expand|Select|Wrap|Line Numbers
  1. Private Sub SelectIDNo_AfterUpdate()
  2.     Me.Filter = ""
  3.  
  4.     If Not IsNull(Me.SelectIDNo) Then
  5.         Me.Filter = "[SSNo] LIKE '" + Forms![AO_ViewEditCandidateData]![SelectIDNo] + "*'"
  6.         Me.FilterOn = True
  7.     Else
  8.         Me.FilterOn = False
  9.     End If
  10.  
  11.     Me.SelectIDNo = ""
  12. End Sub
  13.  
  14. Private Sub SelectIDNo_BeforeUpdate(Cancel As Integer)
  15.  
  16. End Sub
  17.  
  18. Private Sub SelectLastName_AfterUpdate()
  19.  
  20.     Me.Filter = ""
  21.  
  22.     If Not IsNull(Me.SelectLastName) Then
  23.         Me.Filter = "[LastName] LIKE '" + Forms![AO_ViewEditCandidateData]![SelectLastName] + "*'"
  24.         Me.FilterOn = True
  25.     Else
  26.         Me.FilterOn = False
  27.     End If
  28.  
  29.     Me.SelectLastName = ""
  30. End Sub
  31.  
Member
 
Join Date: Mar 2007
Posts: 48
#16: Mar 27 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

Is there any code in the forms events like the on current or on change event?

Is it possible to have any kind of virus in Database? Because this database was made in Office 2000. When I opened the same database using office 2003, it did not let me open it.

The error in Office 2003 was -

" This database has programs that could harm your computer, do you still want to open it?"
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#17: Mar 27 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

Is it possible to have any kind of virus in Database? Because this database was made in Office 2000. When I opened the same database using office 2003, it did not let me open it.

The error in Office 2003 was -

" This database has programs that could harm your computer, do you still want to open it?"

This is a standard warning message in 2003.

Compile the database and see if it compiles OK.

Mary
Member
 
Join Date: Mar 2007
Posts: 48
#18: Mar 27 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

This is a standard warning message in 2003.

Compile the database and see if it compiles OK.

Mary

Hi, it opened fine. Thanks. But the error remains the same. :(
Member
 
Join Date: Mar 2007
Posts: 48
#19: Mar 27 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by mmccarthy

This is a standard warning message in 2003.

Compile the database and see if it compiles OK.

Mary

Is there a way to explicitly compile it?
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,875
#20: Mar 27 '07

re: RecordLocks In Access - Stuck here.


Quote:

Originally Posted by amanjsingh

Is there a way to explicitly compile it?

Open the VBA Editor window and you will find compile under the Debug menu (I think). If not it's there somewhere.

Mary
Reply