rst.Open "SELECT * FROM Equipas WHERE ([ID - Funcionário] LIKE '" & idfunc & "' AND [ID - Tarefa] LIKE ' " & idtask & "' );", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
rst.Delete adAffectCurrent
rst.Update
rst.Close
I receive the runtime error 3021 however the query is not empty.
HansUp
96k11 gold badges77 silver badges135 bronze badges
asked Dec 11, 2013 at 23:41
2
«I receive the runtime error 3021 however the query is not empty.»
Double check that point.
Dim strSelect As String
strSelect = "SELECT * FROM Equipas " & _
"WHERE ([ID - Funcionário] LIKE '" & _
idfunc & "' AND [ID - Tarefa] LIKE ' " & idtask & "' );"
Debug.Print strSelect
rst.Open strSelect, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "recordset is empty"
Else
rs.MoveLast
MsgBox "recordset contains " & rs.RecordCount & " rows"
End If
'rst.Delete adAffectCurrent
'rst.Update
rst.Close
If that version of the code tells you «recordset is empty», go to the Immediate window (Ctrl+g) to examine the SELECT
statement the code built. You can copy the statement text and paste it into SQL View of a new Access query for testing.
My best guess is the query returns no rows because it includes a space just before the value of idtask
, and no [ID - Tarefa]
values match space plus idtask
:
idfunc & "' AND [ID - Tarefa] LIKE ' " & idtask & "' );"
^ here
answered Dec 12, 2013 at 1:06
HansUpHansUp
96k11 gold badges77 silver badges135 bronze badges
Английский
К сожалению, эта статья недоступна на вашем языке.
Symptoms
«Run-time error ‘3021’ No current record»This error occurs when attempting to change the shared SysData folder location from the Admin/Organization screen.
Cause
Incorrect pathing/drive mapping to the shared SysData location, or insufficient permissions to edit the file that stores the shared SysData location.
Resolution
ResolutionVerify that the workstation has the same version/service pack level as the other workstations. Locate the target directory for the FRx32.exe, which launches FRx Designer. Edit the FRx32.cfg file in this directory using Notepad, to show the correct SysData location using UNC mapping:Example:[SysData]Directory=\\\\Servername\\Sharename\\SysData\\CAUTION: Do NOT edit the FRx32.cfg file prior to opening FRx, as this can cause loss of data in the shared Sysdata location. After saving changes to the FRx32.cfg, open FRx.
References
Нужна дополнительная помощь?
Нужны дополнительные параметры?
Explore subscription benefits, browse training courses, learn how to secure your device, and more.
Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.
Номер ошибки: | Ошибка 3021 | |
Название ошибки: | Microsoft Access Error 3021 | |
Описание ошибки: | No current record. | |
Разработчик: | Microsoft Corporation | |
Программное обеспечение: | Microsoft Access | |
Относится к: | Windows XP, Vista, 7, 8, 10, 11 |
Объяснение «Microsoft Access Error 3021»
«Microsoft Access Error 3021» также считается ошибкой во время выполнения (ошибкой). Когда дело доходит до программного обеспечения, как Microsoft Access, инженеры могут использовать различные инструменты, чтобы попытаться сорвать эти ошибки как можно скорее. Ошибки, такие как ошибка 3021, иногда удаляются из отчетов, оставляя проблему остается нерешенной в программном обеспечении.
Ошибка 3021 может столкнуться с пользователями Microsoft Access, если они регулярно используют программу, также рассматривается как «No current record.». Когда появится ошибка, пользователи компьютеров смогут уведомить разработчика о наличии ошибки 3021 через отчеты об ошибках. Затем Microsoft Corporation нужно будет исправить эти ошибки в главном исходном коде и предоставить модифицированную версию для загрузки. Эта ситуация происходит из-за обновления программного обеспечения Microsoft Access является одним из решений ошибок 3021 ошибок и других проблем.
Сбой во время запуска Microsoft Access или во время выполнения, как правило, когда вы столкнетесь с «Microsoft Access Error 3021». Вот три наиболее заметные причины ошибки ошибки 3021 во время выполнения происходят:
Ошибка 3021 Crash — Ошибка 3021 остановит компьютер от выполнения обычной программной операции. Это происходит много, когда продукт (Microsoft Access) или компьютер не может обрабатывать уникальные входные данные.
Утечка памяти «Microsoft Access Error 3021» — последствия утечки памяти Microsoft Access связаны с неисправной операционной системой. Потенциальные триггеры могут быть «бесконечным циклом», или когда программа выполняет «цикл» или повторение снова и снова.
Ошибка 3021 Logic Error — Компьютерная система создает неверную информацию или дает другой результат, даже если входные данные являются точными. Обычные причины этой проблемы связаны с ошибками в обработке данных.
Большинство ошибок Microsoft Access Error 3021 являются результатом отсутствия или повреждения версии файла, установленного Microsoft Access. Как правило, решить проблему можно заменой файла Microsoft Corporation. Кроме того, некоторые ошибки Microsoft Access Error 3021 могут возникать по причине наличия неправильных ссылок на реестр. По этой причине для очистки недействительных записей рекомендуется выполнить сканирование реестра.
Распространенные сообщения об ошибках в Microsoft Access Error 3021
Обнаруженные проблемы Microsoft Access Error 3021 с Microsoft Access включают:
- «Ошибка программы Microsoft Access Error 3021. «
- «Ошибка программного обеспечения Win32: Microsoft Access Error 3021»
- «Microsoft Access Error 3021 должен быть закрыт. «
- «Файл Microsoft Access Error 3021 не найден.»
- «Microsoft Access Error 3021 не может быть найден. «
- «Проблема при запуске приложения: Microsoft Access Error 3021. «
- «Файл Microsoft Access Error 3021 не запущен.»
- «Ошибка Microsoft Access Error 3021. «
- «Ошибка пути программного обеспечения: Microsoft Access Error 3021. «
Обычно ошибки Microsoft Access Error 3021 с Microsoft Access возникают во время запуска или завершения работы, в то время как программы, связанные с Microsoft Access Error 3021, выполняются, или редко во время последовательности обновления ОС. Запись ошибок Microsoft Access Error 3021 внутри Microsoft Access имеет решающее значение для обнаружения неисправностей электронной Windows и ретрансляции обратно в Microsoft Corporation для параметров ремонта.
Создатели Microsoft Access Error 3021 Трудности
Проблемы Microsoft Access Error 3021 могут быть отнесены к поврежденным или отсутствующим файлам, содержащим ошибки записям реестра, связанным с Microsoft Access Error 3021, или к вирусам / вредоносному ПО.
В частности, проблемы с Microsoft Access Error 3021, вызванные:
- Недопустимый Microsoft Access Error 3021 или поврежденный раздел реестра.
- Вирус или вредоносное ПО, повреждающее Microsoft Access Error 3021.
- Microsoft Access Error 3021 ошибочно удален или злонамеренно программным обеспечением, не связанным с приложением Microsoft Access.
- Microsoft Access Error 3021 конфликтует с другой программой (общим файлом).
- Microsoft Access (Microsoft Access Error 3021) поврежден во время загрузки или установки.
Продукт Solvusoft
Загрузка
WinThruster 2022 — Проверьте свой компьютер на наличие ошибок.
Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11
Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление
Содержание
- Как исправить время выполнения Ошибка 3021 Ошибка Microsoft Access 3021
- Vba runtime error 3021
- Answered by:
- Question
- Answers
- Thread: [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
- [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
Как исправить время выполнения Ошибка 3021 Ошибка Microsoft Access 3021
В этой статье представлена ошибка с номером Ошибка 3021, известная как Ошибка Microsoft Access 3021, описанная как Текущих записей нет.
Информация об ошибке
Имя ошибки: Ошибка Microsoft Access 3021
Номер ошибки: Ошибка 3021
Описание: Текущих записей нет.
Программное обеспечение: Microsoft Access
Разработчик: Microsoft
Этот инструмент исправления может устранить такие распространенные компьютерные ошибки, как BSODs, зависание системы и сбои. Он может заменить отсутствующие файлы операционной системы и библиотеки DLL, удалить вредоносное ПО и устранить вызванные им повреждения, а также оптимизировать ваш компьютер для максимальной производительности.
О программе Runtime Ошибка 3021
Время выполнения Ошибка 3021 происходит, когда Microsoft Access дает сбой или падает во время запуска, отсюда и название. Это не обязательно означает, что код был каким-то образом поврежден, просто он не сработал во время выполнения. Такая ошибка появляется на экране в виде раздражающего уведомления, если ее не устранить. Вот симптомы, причины и способы устранения проблемы.
Определения (Бета)
Здесь мы приводим некоторые определения слов, содержащихся в вашей ошибке, в попытке помочь вам понять вашу проблему. Эта работа продолжается, поэтому иногда мы можем неправильно определить слово, так что не стесняйтесь пропустить этот раздел!
- Доступ — НЕ ИСПОЛЬЗУЙТЕ этот тег для Microsoft Access, используйте вместо него [ms-access]
- Запись — запись в программирование — это тип данных с метками для доступа к полям записи.
- Access . Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, которая обычно объединяет реляционный Microsoft JetACE Database Engine с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
- Microsoft Access — Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft который обычно сочетает в себе реляционное ядро СУБД Microsoft JetACE с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
Симптомы Ошибка 3021 — Ошибка Microsoft Access 3021
Ошибки времени выполнения происходят без предупреждения. Сообщение об ошибке может появиться на экране при любом запуске %программы%. Фактически, сообщение об ошибке или другое диалоговое окно может появляться снова и снова, если не принять меры на ранней стадии.
Возможны случаи удаления файлов или появления новых файлов. Хотя этот симптом в основном связан с заражением вирусом, его можно отнести к симптомам ошибки времени выполнения, поскольку заражение вирусом является одной из причин ошибки времени выполнения. Пользователь также может столкнуться с внезапным падением скорости интернет-соединения, но, опять же, это не всегда так.
(Ошибка Microsoft Access 3021) Repair Tool»/>
(Только для примера)
Причины Ошибка Microsoft Access 3021 — Ошибка 3021
При разработке программного обеспечения программисты составляют код, предвидя возникновение ошибок. Однако идеальных проектов не бывает, поскольку ошибки можно ожидать даже при самом лучшем дизайне программы. Глюки могут произойти во время выполнения программы, если определенная ошибка не была обнаружена и устранена во время проектирования и тестирования.
Ошибки во время выполнения обычно вызваны несовместимостью программ, запущенных в одно и то же время. Они также могут возникать из-за проблем с памятью, плохого графического драйвера или заражения вирусом. Каким бы ни был случай, проблему необходимо решить немедленно, чтобы избежать дальнейших проблем. Ниже приведены способы устранения ошибки.
Методы исправления
Ошибки времени выполнения могут быть раздражающими и постоянными, но это не совсем безнадежно, существует возможность ремонта. Вот способы сделать это.
Если метод ремонта вам подошел, пожалуйста, нажмите кнопку upvote слева от ответа, это позволит другим пользователям узнать, какой метод ремонта на данный момент работает лучше всего.
Источник
Vba runtime error 3021
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
Run-time Error 3021: No Current Record
I get this error while I try to Import Excel file in one of the MS Access tables using VBA. Attaching screenshot, how to solve this please??
Just to be clear, I’ve made sure «tblBoQ» table and «C:ImportBoQ» Excel files are at place. So there’s no question about it.
Answers
>>>. but now when I split the table in a FE/BE scenario, it gives me below error. Why is it so please??
According to your description, I have reproduced this issue. Regarding this issue, based on my research, two main reasons for the occurrence of the above error message are discussed below:
1. Appending of the records that were the primary key values
2. Violating referential integrity rules for a relationship defined between tables
You could use Get External Data wizard to import Excel file, after you have completed the Import wizard, Access notifies you of any problems that might have occurred during the import process. In some cases, Access might create a new table called ImportErrors, which contains any data that it was unable to import successfully. You can examine the data in this table to try to find out why the data did not import correctly.
For more information, click here to refer about Introduction to importing and exporting data
Источник
Thread: [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
Thread Tools
Display
[RESOLVED] Run-Time Error ‘3021’ No Current Record Found
I’ve read through the other threads on this topic but they don’t seem to apply to my problem. I have a 1 row table that I’m trying to read into a recordset using VB6, but when I try to access any of the fields in the record, I get a runtime error 3021 «No current record».
I thought that when you use the Set Recordset command the recordset is populated with the contents of the target table. But that’s not happening. Can someone tell me what I’m doing wrong? Any help is greatly appreciated. Here’s my code:
Database: MS Access
Field: mpSalesRankTier1
Data type: Number
Content: 10000
Number of rows in table: 1
Last edited by vb6coder14; Oct 20th, 2014 at 01:03 PM .
Re: Run-Time Error ‘3021’ No Current Record Found
It looks like you are using DAO
Then:
1 Reference the DAO library
2 Change the lines where you declare and where you open Recordset
. If your problem is fixed don’t forget to mark your threads as resolved using the Thread Tools menu .
Re: Run-Time Error ‘3021’ No Current Record Found
jggtz, I made all of the changes you suggested and no dice. I’m still getting the same problem.
Re: Run-Time Error ‘3021’ No Current Record Found
I happen to still use the DAO often. vb6coder14, with the DAO, it’s possible to have the recordset sitting on a non-record, and that’s exactly the case when you initially open a recordset.
All that’s necessary is that you execute a rsCtrlRec.MoveFirst command before you try and read the fields.
Be careful though. That will also throw an error if there are no records in the table. If you also want to avoid that, do something like «If rsCtrlRec.RecordCount > 0 Then . «
Re: Run-Time Error ‘3021’ No Current Record Found
It’s been a while since I have done DAO, so these are only observations, but here it goes..
1- dim rsCtrlRec as RecordSet is valid if your DAO reference is set correctly. (no need for DAO.)
2- Set rsCtrlRec = dbCtrlRec.OpenRecordset(«SYS_CONTROL_RECORD») is ok too
3- I always use indexed recordset, and by habit, I always include the line :
to avoid BOF conditions
4- Make sure you have records :
5- check the position of the record pointer with rsCtrlRec.BOF and rsCtrlRec.EOF when encountering problems such as you have. For example, if you have no records, after opening the recordset :
rsCtrlRec.MoveFirst
if rsCtrlRec.BOF then
rem there are no records
end if
6- and last, but it should have been the first point mentioned, are you sure there is not typo in your field name, and that the field indeed does exist.. you can get the value of a field by its index number instead of a literal
will return the value for the first field in the table, no matter what it’s literal name is. this will also indicate that you have indeed at least one field defined if no error is returned.
Re: Run-Time Error ‘3021’ No Current Record Found
Navion, you can use .MoveFirst, .MoveNext, .MovePrev, and .MoveLast without an index. There’s just no guarantee of the order of the records.
With no index, you just don’t get the use of .Seek. which is where the real power is.
Re: Run-Time Error ‘3021’ No Current Record Found
vb6coder14, here’s the DAO help file, in case you don’t have it. As Navion hinted, also be sure to learn the meaning of .BOF and .EOF. If you’re just using an .MDB style database, I’ve found the DAO to be an incredibly powerful tool. Elegant, bulletproof, and simple.
Re: Run-Time Error ‘3021’ No Current Record Found
Yeah sure. Except for a generic SQL handler program I have written way back then (i still use it and it never required any updating ever since) that used non indexed tables, all the rest of my work uses indexes and since my code rarely fails if ever , I keep methods that have proven their worth , even if things could be done some other ways.
Old habits die hard. For example, I never use :
Dim a as String
It will always be
for me although I am not real strong on Option Explicit why bother and be nagged countless times. I can keep track of variables on my own loll
When you put too much restrictions on coding, it becomes VB 2010 and I don’t wish that anyone
Re: Run-Time Error ‘3021’ No Current Record Found
Hey Navion, I’m totally with you. I mostly work alone these days, but I’ve had to fire programmers in the past who wouldn’t leave unbroken code alone. If it ain’t broke, DON’T FIX IT! There’s another «code sharing» thread on here where I made a similar point. The sharing of .BAS (or other) files in multiple .VBP project is a monumentally bad idea in my opinion. It’s the same issue, someone «fixing» code for one project that breaks another.
I’ll have to admit that I go back to the a!, a$, and a# days, but I have managed to wean myself into the new «as string» etc format. The only similar habit that I won’t break is Left$(s, 4), Mid$(s, 2, 5), etc. I do use variants and even like them, but I do stay away from them whenever possible. (Just noting that Left(s,4) returns a variant whereas Left$(s,4) returns a string.
Oh geez, I’m a HUGE advocate of Option Explicit. SOOO many times before we had it, I can remember beating my head against the wall, when it was just a variable name typo. In fact, I’ve long advocated that there should also be an Option TypeExplicit that applied to Redim as well as functions. I mean, if I want a variant or a late bound object, I’ll declare it as such.
I’ll agree that they should stay the meta-commands (Option . ), but they do make finding bugs easier.
Re: Run-Time Error ‘3021’ No Current Record Found
Its been a while since I have used DAO but I do not remember ever needing to issue a movefirst to get to an active record when a recordset is first opened.
Of course there is no code there that checks to see if any records were returned so my guess would be that movefirst would also throw an error as I suspect the problem is that the recordset is empty
Re: Run-Time Error ‘3021’ No Current Record Found
You know what, DataMiser? You’re right. I guess I’ve just never thought to NOT do a .MoveFirst. I just tested it and the recordset opens on the first record. Actually, all of my tables DO have indices (including PrimaryKey indices), so I’m not sure what happens on tables without an index, but that’s interesting.
Re: Run-Time Error ‘3021’ No Current Record Found
I do not think the presence of or absence of indexes/primary keys would have any effect either.
They will of course make your queries faster when using criteria that is indexed but as far as moving next, previous, first, last I would not expect there to be any difference.
Re: Run-Time Error ‘3021’ No Current Record Found
DataMiser is right. The recordset is empty. What threw me was my lack of understanding of the internal workings of a .MDB file. I actually manually keyed values into the database, but I didn’t hit the ENTER key. I went straight to SAVE. Consequently, although it appeared as if I had data, I really didn’t.
It wasn’t until I physically went back into the database and hit the ENTER key when a 2nd record appeared, this one prefixed with an ‘*’. I’m going to assume that’s the EOF pointer. When I ran my code again, it worked just fine.
Can someone confirm my interpretation of what happened, or am I still off base in my understanding?
Re: Run-Time Error ‘3021’ No Current Record Found
I wrote a paper back in the early days of VB, when they introduced Variants as the default data , destroying old myths and urban legends about stronger typed variables from old time programmers (although I am one of those myself). I do like variants but I use Typed variables too a lot, most often than not actually.
At some point, I got a bit lazy and started to use the variant versions of the common string functions too. but not anymore. they are slower and introduce an element of uncertainty (in my mind anyway, no real rationale on that argument). I reverted back to the mid$ and Trim$ etc. I think readability is much improved.
I have read your posts these past few days, and between the lines too. I think we both would get along
Re: Run-Time Error ‘3021’ No Current Record Found
Before a MoveFirst is called, shouldn’t the recordset be checked for .EOF? I see that the posted code is using the generic ON ERROR GOTO [label], but checking for .EOF after returning the recordset can allow the option of using some default values vs. exiting the routine if .MoveFirst cause an error. Just thinking out loud
Insomnia is just a byproduct of, » It can’t be done»
Classics Enthusiast ? Here’s my 1969 Mustang Mach I Fastback. Her sister ’67 Coupe has been adopted
Re: Run-Time Error ‘3021’ No Current Record Found
Yep, you’re right LaVolpe, but that’s why I mentioned the RecordCount property in post #4. If it’s got records, a MoveFirst will never fail.
And a smile and nod to Navion. )) Are we all having fun now? LMAO
Re: Run-Time Error ‘3021’ No Current Record Found
A recordset, depending on type & sql provider, can have an initial value of -1 if I recall correctly
Insomnia is just a byproduct of, » It can’t be done»
Classics Enthusiast ? Here’s my 1969 Mustang Mach I Fastback. Her sister ’67 Coupe has been adopted
Re: Run-Time Error ‘3021’ No Current Record Found
Yes, but for my own common use, I use indexed tables, a movefirst (that I don’t remember throwing an error on empty recordset), followed by a seek and a NoMatch that will take care of the EOF if any. Navigating down, of course, checking EOF is required.
On error should not be really be used doing DAO, good coding should use BOF, EOF, NoMatch (index stuff). That does not leave much causes for errors
Re: Run-Time Error ‘3021’ No Current Record Found
Indeed Elroy! Indeed! Almost a chat room atmosphere. But let’s not hijack the OP’s thread too much
(for the record lolll)
Re: Run-Time Error ‘3021’ No Current Record Found
Navion, I totally agree. I have my share of On Error Resume Next, and On Error Goto . in my code, but I very seldom use it when using DAO methods. I either get it right, or I debug it.
Actually, I just looked around at some of my standard DAO procedures and did find this code:
I did put error ignoring in there, but, truth be told, I’ve now got no idea why. However, going back to something I said earlier today, if it ain’t broken, don’t fix it.
Re: Run-Time Error ‘3021’ No Current Record Found
Honestly, don’t mess with DAO much any longer, but with ADO. Per MSDN: «A call to either MoveFirst or MoveLast when the Recordset is empty (both BOF and EOF are True) generates an error.»
To avoid that situation, my general iteration of the recordset kinda looks like this
Insomnia is just a byproduct of, » It can’t be done»
Classics Enthusiast ? Here’s my 1969 Mustang Mach I Fastback. Her sister ’67 Coupe has been adopted
Re: Run-Time Error ‘3021’ No Current Record Found
Yep, I seldom let these conditions happen, but I believe that an empty recordset will set both .BOF and .EOF as true. And I think that’s the only time it happens. Also, I’m pretty sure that the DAO and the ADO are VERY similar (if not identical) regarding all of these relatively straightforward procedures.
Re: Run-Time Error ‘3021’ No Current Record Found
Funny that you should mention that Elroy, I forgot to do it myself. another essential of DAO is IsNull, particularly with binary fields, they don’t like much being cast to empty strings, although .FieldSize does the job too.
Re: Run-Time Error ‘3021’ No Current Record Found
Yes, .Recordcount will return -1 in cases where recordcount is not supported. I can’t remember if this is the case with DAO but ADO will return -1 when using a server side cursor no matter how many records there may be.
Checking for .eof is a more fool proof method.
Re: Run-Time Error ‘3021’ No Current Record Found
When using DAO .RecordCount will give you the result only after a .MoveLast method
. If your problem is fixed don’t forget to mark your threads as resolved using the Thread Tools menu .
Источник
Содержание
- Что означает
- Симптомы
- Причины
- Как механик диагностирует ошибку
- Насколько это серьезно
- Как устранять
- Коды, связанные с этой ошибкой
Что означает
Ошибка 3021 AS-TRONIC MAN свидетельствует о проблемах с большим клапаном для закрытия сцепления в системе AS-TRONIC.
AS-TRONIC — это электронная система управления передачами в грузовых автомобилях MAN, которая автоматически переключает передачи и управляет сцеплением.
Большой клапан для закрытия сцепления — это гидравлический клапан, который управляет закрытием сцепления между двигателем и трансмиссией.
Симптомы
Ошибка 3021 AS-TRONIC MAN может проявляться следующими симптомами:
- Неисправность сцепления.
- Неожиданное переключение передач.
- Затруднения в переключении передач.
Причины
Ошибка 3021 AS-TRONIC MAN может быть вызвана следующими причинами:
- Неисправность большого клапана для закрытия сцепления.
- Повреждение электрических проводов или разъемов, связанных с клапаном.
- Неисправность датчиков или других компонентов системы AS-TRONIC.
Как механик диагностирует ошибку
Для диагностики ошибки 3021 AS-TRONIC MAN механик может использовать диагностический сканер, который подключается к электронной системе управления автомобилем. Сканер считывает коды ошибок и показывает, какие компоненты системы AS-TRONIC нуждаются в ремонте или замене.
Насколько это серьезно
Ошибка 3021 AS-TRONIC MAN может привести к серьезным проблемам с передачами и сцеплением в грузовом автомобиле MAN. Если не обратить внимание на эту ошибку, это может привести к поломке системы AS-TRONIC и к необходимости замены дорогостоящих компонентов.
Как устранять
Для устранения ошибки 3021 AS-TRONIC MAN необходимо провести диагностику системы AS-TRONIC и определить, какой компонент нуждается в ремонте или замене. Обычно это может быть большой клапан для закрытия сцепления или поврежденные провода и разъемы.
Коды, связанные с этой ошибкой
Ошибка 3021 AS-TRONIC MAN связана с кодами ошибок:
- 3020: Неисправность малого клапана для закрытия сцепления.
- 3022: Неисправность клапана управления сцеплением.
- 3023: Неисправность электромагнитного клапана для закрытия сцепления.
Если вы заметили какие-либо из перечисленных симптомов, необходимо обратиться к механику для диагностики системы AS-TRONIC и устранения ошибки 3021 AS-TRONIC MAN. Это поможет предотвратить серьезные проблемы с автомобилем и сохранить его в хорошем состоянии.
Номер ошибки: | Ошибка 3021 | |
Название ошибки: | Microsoft Access Error 3021 | |
Описание ошибки: | No current record. | |
Разработчик: | Microsoft Corporation | |
Программное обеспечение: | Microsoft Access | |
Относится к: | Windows XP, Vista, 7, 8, 10, 11 |
Объяснение «Microsoft Access Error 3021»
«Microsoft Access Error 3021» также считается ошибкой во время выполнения (ошибкой). Когда дело доходит до программного обеспечения, как Microsoft Access, инженеры могут использовать различные инструменты, чтобы попытаться сорвать эти ошибки как можно скорее. Ошибки, такие как ошибка 3021, иногда удаляются из отчетов, оставляя проблему остается нерешенной в программном обеспечении.
Ошибка 3021 может столкнуться с пользователями Microsoft Access, если они регулярно используют программу, также рассматривается как «No current record.». Когда появится ошибка, пользователи компьютеров смогут уведомить разработчика о наличии ошибки 3021 через отчеты об ошибках. Затем Microsoft Corporation нужно будет исправить эти ошибки в главном исходном коде и предоставить модифицированную версию для загрузки. Эта ситуация происходит из-за обновления программного обеспечения Microsoft Access является одним из решений ошибок 3021 ошибок и других проблем.
Сбой во время запуска Microsoft Access или во время выполнения, как правило, когда вы столкнетесь с «Microsoft Access Error 3021». Вот три наиболее заметные причины ошибки ошибки 3021 во время выполнения происходят:
Ошибка 3021 Crash — Ошибка 3021 остановит компьютер от выполнения обычной программной операции. Это происходит много, когда продукт (Microsoft Access) или компьютер не может обрабатывать уникальные входные данные.
Утечка памяти «Microsoft Access Error 3021» — последствия утечки памяти Microsoft Access связаны с неисправной операционной системой. Потенциальные триггеры могут быть «бесконечным циклом», или когда программа выполняет «цикл» или повторение снова и снова.
Ошибка 3021 Logic Error — Компьютерная система создает неверную информацию или дает другой результат, даже если входные данные являются точными. Обычные причины этой проблемы связаны с ошибками в обработке данных.
Большинство ошибок Microsoft Access Error 3021 являются результатом отсутствия или повреждения версии файла, установленного Microsoft Access. Как правило, решить проблему можно заменой файла Microsoft Corporation. Кроме того, некоторые ошибки Microsoft Access Error 3021 могут возникать по причине наличия неправильных ссылок на реестр. По этой причине для очистки недействительных записей рекомендуется выполнить сканирование реестра.
Распространенные сообщения об ошибках в Microsoft Access Error 3021
Обнаруженные проблемы Microsoft Access Error 3021 с Microsoft Access включают:
- «Ошибка программы Microsoft Access Error 3021. «
- «Ошибка программного обеспечения Win32: Microsoft Access Error 3021»
- «Microsoft Access Error 3021 должен быть закрыт. «
- «Файл Microsoft Access Error 3021 не найден.»
- «Microsoft Access Error 3021 не может быть найден. «
- «Проблема при запуске приложения: Microsoft Access Error 3021. «
- «Файл Microsoft Access Error 3021 не запущен.»
- «Ошибка Microsoft Access Error 3021. «
- «Ошибка пути программного обеспечения: Microsoft Access Error 3021. «
Обычно ошибки Microsoft Access Error 3021 с Microsoft Access возникают во время запуска или завершения работы, в то время как программы, связанные с Microsoft Access Error 3021, выполняются, или редко во время последовательности обновления ОС. Запись ошибок Microsoft Access Error 3021 внутри Microsoft Access имеет решающее значение для обнаружения неисправностей электронной Windows и ретрансляции обратно в Microsoft Corporation для параметров ремонта.
Создатели Microsoft Access Error 3021 Трудности
Проблемы Microsoft Access Error 3021 могут быть отнесены к поврежденным или отсутствующим файлам, содержащим ошибки записям реестра, связанным с Microsoft Access Error 3021, или к вирусам / вредоносному ПО.
В частности, проблемы с Microsoft Access Error 3021, вызванные:
- Недопустимый Microsoft Access Error 3021 или поврежденный раздел реестра.
- Вирус или вредоносное ПО, повреждающее Microsoft Access Error 3021.
- Microsoft Access Error 3021 ошибочно удален или злонамеренно программным обеспечением, не связанным с приложением Microsoft Access.
- Microsoft Access Error 3021 конфликтует с другой программой (общим файлом).
- Microsoft Access (Microsoft Access Error 3021) поврежден во время загрузки или установки.
Продукт Solvusoft
Загрузка
WinThruster 2022 — Проверьте свой компьютер на наличие ошибок.
Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11
Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление
Содержание
- Как исправить время выполнения Ошибка 3021 Ошибка Microsoft Access 3021
- Vba runtime error 3021
- Answered by:
- Question
- Answers
- Thread: [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
- [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
- Re: Run-Time Error ‘3021’ No Current Record Found
Как исправить время выполнения Ошибка 3021 Ошибка Microsoft Access 3021
В этой статье представлена ошибка с номером Ошибка 3021, известная как Ошибка Microsoft Access 3021, описанная как Текущих записей нет.
Информация об ошибке
Имя ошибки: Ошибка Microsoft Access 3021
Номер ошибки: Ошибка 3021
Описание: Текущих записей нет.
Программное обеспечение: Microsoft Access
Разработчик: Microsoft
Этот инструмент исправления может устранить такие распространенные компьютерные ошибки, как BSODs, зависание системы и сбои. Он может заменить отсутствующие файлы операционной системы и библиотеки DLL, удалить вредоносное ПО и устранить вызванные им повреждения, а также оптимизировать ваш компьютер для максимальной производительности.
О программе Runtime Ошибка 3021
Время выполнения Ошибка 3021 происходит, когда Microsoft Access дает сбой или падает во время запуска, отсюда и название. Это не обязательно означает, что код был каким-то образом поврежден, просто он не сработал во время выполнения. Такая ошибка появляется на экране в виде раздражающего уведомления, если ее не устранить. Вот симптомы, причины и способы устранения проблемы.
Определения (Бета)
Здесь мы приводим некоторые определения слов, содержащихся в вашей ошибке, в попытке помочь вам понять вашу проблему. Эта работа продолжается, поэтому иногда мы можем неправильно определить слово, так что не стесняйтесь пропустить этот раздел!
- Доступ — НЕ ИСПОЛЬЗУЙТЕ этот тег для Microsoft Access, используйте вместо него [ms-access]
- Запись — запись в программирование — это тип данных с метками для доступа к полям записи.
- Access . Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, которая обычно объединяет реляционный Microsoft JetACE Database Engine с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
- Microsoft Access — Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft который обычно сочетает в себе реляционное ядро СУБД Microsoft JetACE с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
Симптомы Ошибка 3021 — Ошибка Microsoft Access 3021
Ошибки времени выполнения происходят без предупреждения. Сообщение об ошибке может появиться на экране при любом запуске %программы%. Фактически, сообщение об ошибке или другое диалоговое окно может появляться снова и снова, если не принять меры на ранней стадии.
Возможны случаи удаления файлов или появления новых файлов. Хотя этот симптом в основном связан с заражением вирусом, его можно отнести к симптомам ошибки времени выполнения, поскольку заражение вирусом является одной из причин ошибки времени выполнения. Пользователь также может столкнуться с внезапным падением скорости интернет-соединения, но, опять же, это не всегда так.
(Ошибка Microsoft Access 3021) Repair Tool»/>
(Только для примера)
Причины Ошибка Microsoft Access 3021 — Ошибка 3021
При разработке программного обеспечения программисты составляют код, предвидя возникновение ошибок. Однако идеальных проектов не бывает, поскольку ошибки можно ожидать даже при самом лучшем дизайне программы. Глюки могут произойти во время выполнения программы, если определенная ошибка не была обнаружена и устранена во время проектирования и тестирования.
Ошибки во время выполнения обычно вызваны несовместимостью программ, запущенных в одно и то же время. Они также могут возникать из-за проблем с памятью, плохого графического драйвера или заражения вирусом. Каким бы ни был случай, проблему необходимо решить немедленно, чтобы избежать дальнейших проблем. Ниже приведены способы устранения ошибки.
Методы исправления
Ошибки времени выполнения могут быть раздражающими и постоянными, но это не совсем безнадежно, существует возможность ремонта. Вот способы сделать это.
Если метод ремонта вам подошел, пожалуйста, нажмите кнопку upvote слева от ответа, это позволит другим пользователям узнать, какой метод ремонта на данный момент работает лучше всего.
Источник
Vba runtime error 3021
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
Run-time Error 3021: No Current Record
I get this error while I try to Import Excel file in one of the MS Access tables using VBA. Attaching screenshot, how to solve this please??
Just to be clear, I’ve made sure «tblBoQ» table and «C:ImportBoQ» Excel files are at place. So there’s no question about it.
Answers
>>>. but now when I split the table in a FE/BE scenario, it gives me below error. Why is it so please??
According to your description, I have reproduced this issue. Regarding this issue, based on my research, two main reasons for the occurrence of the above error message are discussed below:
1. Appending of the records that were the primary key values
2. Violating referential integrity rules for a relationship defined between tables
You could use Get External Data wizard to import Excel file, after you have completed the Import wizard, Access notifies you of any problems that might have occurred during the import process. In some cases, Access might create a new table called ImportErrors, which contains any data that it was unable to import successfully. You can examine the data in this table to try to find out why the data did not import correctly.
For more information, click here to refer about Introduction to importing and exporting data
Источник
Thread: [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
Thread Tools
Display
[RESOLVED] Run-Time Error ‘3021’ No Current Record Found
I’ve read through the other threads on this topic but they don’t seem to apply to my problem. I have a 1 row table that I’m trying to read into a recordset using VB6, but when I try to access any of the fields in the record, I get a runtime error 3021 «No current record».
I thought that when you use the Set Recordset command the recordset is populated with the contents of the target table. But that’s not happening. Can someone tell me what I’m doing wrong? Any help is greatly appreciated. Here’s my code:
Database: MS Access
Field: mpSalesRankTier1
Data type: Number
Content: 10000
Number of rows in table: 1
Last edited by vb6coder14; Oct 20th, 2014 at 01:03 PM .
Re: Run-Time Error ‘3021’ No Current Record Found
It looks like you are using DAO
Then:
1 Reference the DAO library
2 Change the lines where you declare and where you open Recordset
. If your problem is fixed don’t forget to mark your threads as resolved using the Thread Tools menu .
Re: Run-Time Error ‘3021’ No Current Record Found
jggtz, I made all of the changes you suggested and no dice. I’m still getting the same problem.
Re: Run-Time Error ‘3021’ No Current Record Found
I happen to still use the DAO often. vb6coder14, with the DAO, it’s possible to have the recordset sitting on a non-record, and that’s exactly the case when you initially open a recordset.
All that’s necessary is that you execute a rsCtrlRec.MoveFirst command before you try and read the fields.
Be careful though. That will also throw an error if there are no records in the table. If you also want to avoid that, do something like «If rsCtrlRec.RecordCount > 0 Then . «
Re: Run-Time Error ‘3021’ No Current Record Found
It’s been a while since I have done DAO, so these are only observations, but here it goes..
1- dim rsCtrlRec as RecordSet is valid if your DAO reference is set correctly. (no need for DAO.)
2- Set rsCtrlRec = dbCtrlRec.OpenRecordset(«SYS_CONTROL_RECORD») is ok too
3- I always use indexed recordset, and by habit, I always include the line :
to avoid BOF conditions
4- Make sure you have records :
5- check the position of the record pointer with rsCtrlRec.BOF and rsCtrlRec.EOF when encountering problems such as you have. For example, if you have no records, after opening the recordset :
rsCtrlRec.MoveFirst
if rsCtrlRec.BOF then
rem there are no records
end if
6- and last, but it should have been the first point mentioned, are you sure there is not typo in your field name, and that the field indeed does exist.. you can get the value of a field by its index number instead of a literal
will return the value for the first field in the table, no matter what it’s literal name is. this will also indicate that you have indeed at least one field defined if no error is returned.
Re: Run-Time Error ‘3021’ No Current Record Found
Navion, you can use .MoveFirst, .MoveNext, .MovePrev, and .MoveLast without an index. There’s just no guarantee of the order of the records.
With no index, you just don’t get the use of .Seek. which is where the real power is.
Re: Run-Time Error ‘3021’ No Current Record Found
vb6coder14, here’s the DAO help file, in case you don’t have it. As Navion hinted, also be sure to learn the meaning of .BOF and .EOF. If you’re just using an .MDB style database, I’ve found the DAO to be an incredibly powerful tool. Elegant, bulletproof, and simple.
Re: Run-Time Error ‘3021’ No Current Record Found
Yeah sure. Except for a generic SQL handler program I have written way back then (i still use it and it never required any updating ever since) that used non indexed tables, all the rest of my work uses indexes and since my code rarely fails if ever , I keep methods that have proven their worth , even if things could be done some other ways.
Old habits die hard. For example, I never use :
Dim a as String
It will always be
for me although I am not real strong on Option Explicit why bother and be nagged countless times. I can keep track of variables on my own loll
When you put too much restrictions on coding, it becomes VB 2010 and I don’t wish that anyone
Re: Run-Time Error ‘3021’ No Current Record Found
Hey Navion, I’m totally with you. I mostly work alone these days, but I’ve had to fire programmers in the past who wouldn’t leave unbroken code alone. If it ain’t broke, DON’T FIX IT! There’s another «code sharing» thread on here where I made a similar point. The sharing of .BAS (or other) files in multiple .VBP project is a monumentally bad idea in my opinion. It’s the same issue, someone «fixing» code for one project that breaks another.
I’ll have to admit that I go back to the a!, a$, and a# days, but I have managed to wean myself into the new «as string» etc format. The only similar habit that I won’t break is Left$(s, 4), Mid$(s, 2, 5), etc. I do use variants and even like them, but I do stay away from them whenever possible. (Just noting that Left(s,4) returns a variant whereas Left$(s,4) returns a string.
Oh geez, I’m a HUGE advocate of Option Explicit. SOOO many times before we had it, I can remember beating my head against the wall, when it was just a variable name typo. In fact, I’ve long advocated that there should also be an Option TypeExplicit that applied to Redim as well as functions. I mean, if I want a variant or a late bound object, I’ll declare it as such.
I’ll agree that they should stay the meta-commands (Option . ), but they do make finding bugs easier.
Re: Run-Time Error ‘3021’ No Current Record Found
Its been a while since I have used DAO but I do not remember ever needing to issue a movefirst to get to an active record when a recordset is first opened.
Of course there is no code there that checks to see if any records were returned so my guess would be that movefirst would also throw an error as I suspect the problem is that the recordset is empty
Re: Run-Time Error ‘3021’ No Current Record Found
You know what, DataMiser? You’re right. I guess I’ve just never thought to NOT do a .MoveFirst. I just tested it and the recordset opens on the first record. Actually, all of my tables DO have indices (including PrimaryKey indices), so I’m not sure what happens on tables without an index, but that’s interesting.
Re: Run-Time Error ‘3021’ No Current Record Found
I do not think the presence of or absence of indexes/primary keys would have any effect either.
They will of course make your queries faster when using criteria that is indexed but as far as moving next, previous, first, last I would not expect there to be any difference.
Re: Run-Time Error ‘3021’ No Current Record Found
DataMiser is right. The recordset is empty. What threw me was my lack of understanding of the internal workings of a .MDB file. I actually manually keyed values into the database, but I didn’t hit the ENTER key. I went straight to SAVE. Consequently, although it appeared as if I had data, I really didn’t.
It wasn’t until I physically went back into the database and hit the ENTER key when a 2nd record appeared, this one prefixed with an ‘*’. I’m going to assume that’s the EOF pointer. When I ran my code again, it worked just fine.
Can someone confirm my interpretation of what happened, or am I still off base in my understanding?
Re: Run-Time Error ‘3021’ No Current Record Found
I wrote a paper back in the early days of VB, when they introduced Variants as the default data , destroying old myths and urban legends about stronger typed variables from old time programmers (although I am one of those myself). I do like variants but I use Typed variables too a lot, most often than not actually.
At some point, I got a bit lazy and started to use the variant versions of the common string functions too. but not anymore. they are slower and introduce an element of uncertainty (in my mind anyway, no real rationale on that argument). I reverted back to the mid$ and Trim$ etc. I think readability is much improved.
I have read your posts these past few days, and between the lines too. I think we both would get along
Re: Run-Time Error ‘3021’ No Current Record Found
Before a MoveFirst is called, shouldn’t the recordset be checked for .EOF? I see that the posted code is using the generic ON ERROR GOTO [label], but checking for .EOF after returning the recordset can allow the option of using some default values vs. exiting the routine if .MoveFirst cause an error. Just thinking out loud
Insomnia is just a byproduct of, » It can’t be done»
Classics Enthusiast ? Here’s my 1969 Mustang Mach I Fastback. Her sister ’67 Coupe has been adopted
Re: Run-Time Error ‘3021’ No Current Record Found
Yep, you’re right LaVolpe, but that’s why I mentioned the RecordCount property in post #4. If it’s got records, a MoveFirst will never fail.
And a smile and nod to Navion. )) Are we all having fun now? LMAO
Re: Run-Time Error ‘3021’ No Current Record Found
A recordset, depending on type & sql provider, can have an initial value of -1 if I recall correctly
Insomnia is just a byproduct of, » It can’t be done»
Classics Enthusiast ? Here’s my 1969 Mustang Mach I Fastback. Her sister ’67 Coupe has been adopted
Re: Run-Time Error ‘3021’ No Current Record Found
Yes, but for my own common use, I use indexed tables, a movefirst (that I don’t remember throwing an error on empty recordset), followed by a seek and a NoMatch that will take care of the EOF if any. Navigating down, of course, checking EOF is required.
On error should not be really be used doing DAO, good coding should use BOF, EOF, NoMatch (index stuff). That does not leave much causes for errors
Re: Run-Time Error ‘3021’ No Current Record Found
Indeed Elroy! Indeed! Almost a chat room atmosphere. But let’s not hijack the OP’s thread too much
(for the record lolll)
Re: Run-Time Error ‘3021’ No Current Record Found
Navion, I totally agree. I have my share of On Error Resume Next, and On Error Goto . in my code, but I very seldom use it when using DAO methods. I either get it right, or I debug it.
Actually, I just looked around at some of my standard DAO procedures and did find this code:
I did put error ignoring in there, but, truth be told, I’ve now got no idea why. However, going back to something I said earlier today, if it ain’t broken, don’t fix it.
Re: Run-Time Error ‘3021’ No Current Record Found
Honestly, don’t mess with DAO much any longer, but with ADO. Per MSDN: «A call to either MoveFirst or MoveLast when the Recordset is empty (both BOF and EOF are True) generates an error.»
To avoid that situation, my general iteration of the recordset kinda looks like this
Insomnia is just a byproduct of, » It can’t be done»
Classics Enthusiast ? Here’s my 1969 Mustang Mach I Fastback. Her sister ’67 Coupe has been adopted
Re: Run-Time Error ‘3021’ No Current Record Found
Yep, I seldom let these conditions happen, but I believe that an empty recordset will set both .BOF and .EOF as true. And I think that’s the only time it happens. Also, I’m pretty sure that the DAO and the ADO are VERY similar (if not identical) regarding all of these relatively straightforward procedures.
Re: Run-Time Error ‘3021’ No Current Record Found
Funny that you should mention that Elroy, I forgot to do it myself. another essential of DAO is IsNull, particularly with binary fields, they don’t like much being cast to empty strings, although .FieldSize does the job too.
Re: Run-Time Error ‘3021’ No Current Record Found
Yes, .Recordcount will return -1 in cases where recordcount is not supported. I can’t remember if this is the case with DAO but ADO will return -1 when using a server side cursor no matter how many records there may be.
Checking for .eof is a more fool proof method.
Re: Run-Time Error ‘3021’ No Current Record Found
When using DAO .RecordCount will give you the result only after a .MoveLast method
. If your problem is fixed don’t forget to mark your threads as resolved using the Thread Tools menu .
Источник