Many Access users have reported encountering the error 3021 – No current record while using the Recordset Object in the VBA code. This error occurs when you try to run a query that requires a current record but is unavailable or when you try to edit the records in the database. It can also occur when you use incorrect queries while importing tables into the database. This article will discuss the methods to fix this VBA error in MS Access.
Table of Contents
Why does MS Access Error 3021 – No Current Record Occurs?
There are many reasons for the Access error 3021 – No current record error. Some of them are:
- Mapped drive issues
- Corrupted records in the Access database
- Incorrect path to the shared SysData folder
- You do not have permission to edit the records in the file
- When the recordset is empty
- The recordsets are not properly initialized
Methods to Resolve MS Access Error 3021 – No Current Record Error
First, make sure the query you are using to modify the record is correct. Check if the conditions are correctly defined. If still the problem is not resolved, then follow the below steps:
Method 1: Verify BOF/EOF Properties to Check Records
The error 3021 can occur if you try to open a recordset that is unavailable or empty. In Access, you can’t position the empty recordset. To check this, you can use BOF/EOF property. This property helps you determine the position of the current records. If the BOF/EOF properties are set as True, then there is no current record.
Method 2: Check and Correct the Path of the SysData Folder
The SysData folder is a directory folder on the network containing all the important files that are required to execute FRx database files. If the path to this shared folder is incorrect, then you can get the error 3021. You can check and correct the folder location to fix the issue. Here are the steps:
- First, check whether all the workstations have installed the same service pack.
- Then, locate the exe folder and use Notepad to edit the FRx32.cfg file to show the correct SysData location using the Standard UNC paths.
Caution: Changing the FRx32.cfg file prior to opening FRx can lead to data loss in the shared SysData location.
- Once you applied all the changes to the FRx32.cfg file, open FRx.
Method 3: Verify SysData Folder Permissions
You may be unable to edit the SysData folder if you do not have sufficient permissions to modify this folder. In such a case, you can verify and change the folder permissions. Follow these steps:
- Navigate to the folder, right-click on it, and then select Properties.
- Go to the Attribution section and check whether the Read-only checkbox is checked or not. If it is selected, then clear it.
- Select OK.
- Locate the Security option and then click Edit
- Check if all the users have complete permissions (Read, Read & Execute, Write, and Modify) for the folder. If not, then assign the permissions and select OK.
Method 4: Repair Your Access Database
The MS Access Error 3021 – No Current Record can occur if the Access database contains corrupted records or tables. You can repair the database using the Compact and Repair database tool in MS Access. Here are the steps:
Note: Ensure that no other user is using the database file.
- Open Microsoft Access.
- On the Templates page, double-click the Blank Database option.
- Select File > Close.
- Select Database Tools and then select Compact and Repair Database.
- On the Database to Compact From window, navigate to the affected Admission database file and double-click on it.
- It resolve make a copy of the repaired file at the same place.
The Compact and Repair tool can help fix minor corruption issues within the database. However, Compact and Repair may not work in certain scenarios. If it does not repair the database, opt for a professional Access database recovery tool, such as Stellar Repair for Access. It can easily repair severely corrupted database files and recover all the objects, including objects and macros, with complete consistency. This application is quite powerful and extremely easy-to-use, and helps you fix errors that occurred due to corrupted data in the database. It is compatible with all the MS Access versions.
You can get the MS Access error 3021 – No current record when trying to access data from an unavailable record set or when editing records in the database file. You can try the overhead methods to fix the issue. If the Access database file is severely corrupted, then use an advanced Access database recovery tool, like Stellar Repair for Access to repair the corrupt file. Download the software’s demo version to preview the recoverable objects in the database.
Emergency Tech: How Smart Devices Enhance Car Accident Response and Communication
In the fast-evolving landscape of personal technology, the intersection of innovation and safety is becoming increasingly prominent. One area where…
How To Improve The Customer Experience
Ultimately, there is nothing more important than the customer experience. If a customer has a positive experience when buying from…