Run time error 3021

Ошибка 3021 Ошибка Microsoft Access 3021 ошибки могут привести к зависанию или сбою компьютера, а также к возможному заражению вредоносным ПО. Выполните следующие простые действия, чтобы исправить Runtime Errors ошибки быстро и просто.

В этой статье представлена ошибка с номером Ошибка 3021, известная как Ошибка Microsoft Access 3021, описанная как Текущих записей нет.

О программе 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

Ошибки времени выполнения происходят без предупреждения. Сообщение об ошибке может появиться на экране при любом запуске %программы%. Фактически, сообщение об ошибке или другое диалоговое окно может появляться снова и снова, если не принять меры на ранней стадии.

Возможны случаи удаления файлов или появления новых файлов. Хотя этот симптом в основном связан с заражением вирусом, его можно отнести к симптомам ошибки времени выполнения, поскольку заражение вирусом является одной из причин ошибки времени выполнения. Пользователь также может столкнуться с внезапным падением скорости интернет-соединения, но, опять же, это не всегда так.

Fix Ошибка Microsoft Access 3021 (Error Ошибка 3021)
(Только для примера)

Причины Ошибка Microsoft Access 3021 — Ошибка 3021

При разработке программного обеспечения программисты составляют код, предвидя возникновение ошибок. Однако идеальных проектов не бывает, поскольку ошибки можно ожидать даже при самом лучшем дизайне программы. Глюки могут произойти во время выполнения программы, если определенная ошибка не была обнаружена и устранена во время проектирования и тестирования.

Ошибки во время выполнения обычно вызваны несовместимостью программ, запущенных в одно и то же время. Они также могут возникать из-за проблем с памятью, плохого графического драйвера или заражения вирусом. Каким бы ни был случай, проблему необходимо решить немедленно, чтобы избежать дальнейших проблем. Ниже приведены способы устранения ошибки.

Методы исправления

Ошибки времени выполнения могут быть раздражающими и постоянными, но это не совсем безнадежно, существует возможность ремонта. Вот способы сделать это.

Если метод ремонта вам подошел, пожалуйста, нажмите кнопку upvote слева от ответа, это позволит другим пользователям узнать, какой метод ремонта на данный момент работает лучше всего.

Обратите внимание: ни ErrorVault.com, ни его авторы не несут ответственности за результаты действий, предпринятых при использовании любого из методов ремонта, перечисленных на этой странице — вы выполняете эти шаги на свой страх и риск.

Метод 1 — Закройте конфликтующие программы

Когда вы получаете ошибку во время выполнения, имейте в виду, что это происходит из-за программ, которые конфликтуют друг с другом. Первое, что вы можете сделать, чтобы решить проблему, — это остановить эти конфликтующие программы.

  • Откройте диспетчер задач, одновременно нажав Ctrl-Alt-Del. Это позволит вам увидеть список запущенных в данный момент программ.
  • Перейдите на вкладку «Процессы» и остановите программы одну за другой, выделив каждую программу и нажав кнопку «Завершить процесс».
  • Вам нужно будет следить за тем, будет ли сообщение об ошибке появляться каждый раз при остановке процесса.
  • Как только вы определите, какая программа вызывает ошибку, вы можете перейти к следующему этапу устранения неполадок, переустановив приложение.

Метод 2 — Обновите / переустановите конфликтующие программы

Использование панели управления

  • В Windows 7 нажмите кнопку «Пуск», затем нажмите «Панель управления», затем «Удалить программу».
  • В Windows 8 нажмите кнопку «Пуск», затем прокрутите вниз и нажмите «Дополнительные настройки», затем нажмите «Панель управления»> «Удалить программу».
  • Для Windows 10 просто введите «Панель управления» в поле поиска и щелкните результат, затем нажмите «Удалить программу».
  • В разделе «Программы и компоненты» щелкните проблемную программу и нажмите «Обновить» или «Удалить».
  • Если вы выбрали обновление, вам просто нужно будет следовать подсказке, чтобы завершить процесс, однако, если вы выбрали «Удалить», вы будете следовать подсказке, чтобы удалить, а затем повторно загрузить или использовать установочный диск приложения для переустановки. программа.

Использование других методов

  • В Windows 7 список всех установленных программ можно найти, нажав кнопку «Пуск» и наведя указатель мыши на список, отображаемый на вкладке. Вы можете увидеть в этом списке утилиту для удаления программы. Вы можете продолжить и удалить с помощью утилит, доступных на этой вкладке.
  • В Windows 10 вы можете нажать «Пуск», затем «Настройка», а затем — «Приложения».
  • Прокрутите вниз, чтобы увидеть список приложений и функций, установленных на вашем компьютере.
  • Щелкните программу, которая вызывает ошибку времени выполнения, затем вы можете удалить ее или щелкнуть Дополнительные параметры, чтобы сбросить приложение.

Метод 3 — Обновите программу защиты от вирусов или загрузите и установите последнюю версию Центра обновления Windows.

Заражение вирусом, вызывающее ошибку выполнения на вашем компьютере, необходимо немедленно предотвратить, поместить в карантин или удалить. Убедитесь, что вы обновили свою антивирусную программу и выполнили тщательное сканирование компьютера или запустите Центр обновления Windows, чтобы получить последние определения вирусов и исправить их.

Метод 4 — Переустановите библиотеки времени выполнения

Вы можете получить сообщение об ошибке из-за обновления, такого как пакет MS Visual C ++, который может быть установлен неправильно или полностью. Что вы можете сделать, так это удалить текущий пакет и установить новую копию.

  • Удалите пакет, выбрав «Программы и компоненты», найдите и выделите распространяемый пакет Microsoft Visual C ++.
  • Нажмите «Удалить» в верхней части списка и, когда это будет сделано, перезагрузите компьютер.
  • Загрузите последний распространяемый пакет от Microsoft и установите его.

Метод 5 — Запустить очистку диска

Вы также можете столкнуться с ошибкой выполнения из-за очень нехватки свободного места на вашем компьютере.

  • Вам следует подумать о резервном копировании файлов и освобождении места на жестком диске.
  • Вы также можете очистить кеш и перезагрузить компьютер.
  • Вы также можете запустить очистку диска, открыть окно проводника и щелкнуть правой кнопкой мыши по основному каталогу (обычно это C :)
  • Щелкните «Свойства», а затем — «Очистка диска».

Метод 6 — Переустановите графический драйвер

Если ошибка связана с плохим графическим драйвером, вы можете сделать следующее:

  • Откройте диспетчер устройств и найдите драйвер видеокарты.
  • Щелкните правой кнопкой мыши драйвер видеокарты, затем нажмите «Удалить», затем перезагрузите компьютер.

Метод 7 — Ошибка выполнения, связанная с IE

Если полученная ошибка связана с Internet Explorer, вы можете сделать следующее:

  1. Сбросьте настройки браузера.
    • В Windows 7 вы можете нажать «Пуск», перейти в «Панель управления» и нажать «Свойства обозревателя» слева. Затем вы можете перейти на вкладку «Дополнительно» и нажать кнопку «Сброс».
    • Для Windows 8 и 10 вы можете нажать «Поиск» и ввести «Свойства обозревателя», затем перейти на вкладку «Дополнительно» и нажать «Сброс».
  2. Отключить отладку скриптов и уведомления об ошибках.
    • В том же окне «Свойства обозревателя» можно перейти на вкладку «Дополнительно» и найти пункт «Отключить отладку сценария».
    • Установите флажок в переключателе.
    • Одновременно снимите флажок «Отображать уведомление о каждой ошибке сценария», затем нажмите «Применить» и «ОК», затем перезагрузите компьютер.

Если эти быстрые исправления не работают, вы всегда можете сделать резервную копию файлов и запустить восстановление на вашем компьютере. Однако вы можете сделать это позже, когда перечисленные здесь решения не сработают.

Другие языки:

How to fix Error 3021 (Microsoft Access Error 3021) — No current record.
Wie beheben Fehler 3021 (Microsoft Access-Fehler 3021) — Kein aktueller Rekord.
Come fissare Errore 3021 (Errore di Microsoft Access 3021) — Nessun record attuale.
Hoe maak je Fout 3021 (Microsoft Access-fout 3021) — Geen actueel record.
Comment réparer Erreur 3021 (Erreur d’accès Microsoft 3021) — Aucun enregistrement actuel.
어떻게 고치는 지 오류 3021 (마이크로소프트 액세스 오류 3021) — 현재 기록이 없습니다.
Como corrigir o Erro 3021 (Erro 3021 do Microsoft Access) — Nenhum registro atual.
Hur man åtgärdar Fel 3021 (Microsoft Access Error 3021) — Inget aktuellt rekord.
Jak naprawić Błąd 3021 (Błąd Microsoft Access 3021) — Brak aktualnego rekordu.
Cómo arreglar Error 3021 (Error de Microsoft Access 3021) — Sin registro actual.

The Author Об авторе: Фил Харт является участником сообщества Microsoft с 2010 года. С текущим количеством баллов более 100 000 он внес более 3000 ответов на форумах Microsoft Support и создал почти 200 новых справочных статей в Technet Wiki.

Следуйте за нами: Facebook Youtube Twitter

Последнее обновление:

13/03/22 03:56 : Пользователь Windows 8.1 проголосовал за то, что метод восстановления 1 работает для него.

Рекомендуемый инструмент для ремонта:

Этот инструмент восстановления может устранить такие распространенные проблемы компьютера, как синие экраны, сбои и замораживание, отсутствующие DLL-файлы, а также устранить повреждения от вредоносных программ/вирусов и многое другое путем замены поврежденных и отсутствующих системных файлов.

ШАГ 1:

Нажмите здесь, чтобы скачать и установите средство восстановления Windows.

ШАГ 2:

Нажмите на Start Scan и позвольте ему проанализировать ваше устройство.

ШАГ 3:

Нажмите на Repair All, чтобы устранить все обнаруженные проблемы.

СКАЧАТЬ СЕЙЧАС

Совместимость

Требования

1 Ghz CPU, 512 MB RAM, 40 GB HDD
Эта загрузка предлагает неограниченное бесплатное сканирование ПК с Windows. Полное восстановление системы начинается от $19,95.

ID статьи: ACX06411RU

Применяется к: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000

Содержание

  1. Как исправить ошибку Microsoft Access 3021
  2. Объяснение «Microsoft Access Error 3021»
  3. Почему происходит ошибка времени выполнения 3021?
  4. Распространенные сообщения об ошибках в Microsoft Access Error 3021
  5. Создатели Microsoft Access Error 3021 Трудности
  6. Как исправить время выполнения Ошибка 3021 Ошибка Microsoft Access 3021
  7. Thread: [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
  8. [RESOLVED] Run-Time Error ‘3021’ No Current Record Found
  9. Re: Run-Time Error ‘3021’ No Current Record Found
  10. Re: Run-Time Error ‘3021’ No Current Record Found
  11. Re: Run-Time Error ‘3021’ No Current Record Found
  12. Re: Run-Time Error ‘3021’ No Current Record Found
  13. Re: Run-Time Error ‘3021’ No Current Record Found
  14. Re: Run-Time Error ‘3021’ No Current Record Found
  15. Re: Run-Time Error ‘3021’ No Current Record Found
  16. Re: Run-Time Error ‘3021’ No Current Record Found
  17. Re: Run-Time Error ‘3021’ No Current Record Found
  18. Re: Run-Time Error ‘3021’ No Current Record Found
  19. Re: Run-Time Error ‘3021’ No Current Record Found
  20. Re: Run-Time Error ‘3021’ No Current Record Found
  21. Re: Run-Time Error ‘3021’ No Current Record Found
  22. Re: Run-Time Error ‘3021’ No Current Record Found
  23. Re: Run-Time Error ‘3021’ No Current Record Found
  24. Re: Run-Time Error ‘3021’ No Current Record Found
  25. Re: Run-Time Error ‘3021’ No Current Record Found
  26. Re: Run-Time Error ‘3021’ No Current Record Found
  27. Re: Run-Time Error ‘3021’ No Current Record Found
  28. Re: Run-Time Error ‘3021’ No Current Record Found
  29. Re: Run-Time Error ‘3021’ No Current Record Found
  30. Re: Run-Time Error ‘3021’ No Current Record Found
  31. Re: Run-Time Error ‘3021’ No Current Record Found
  32. Re: Run-Time Error ‘3021’ No Current Record Found

Как исправить ошибку Microsoft Access 3021

Номер ошибки: Ошибка 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 ошибок и других проблем.

Почему происходит ошибка времени выполнения 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) поврежден во время загрузки или установки.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Источник

Как исправить время выполнения Ошибка 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 слева от ответа, это позволит другим пользователям узнать, какой метод ремонта на данный момент работает лучше всего.

Источник

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 .

Источник

I am trying to export multiple datasets to the respective new Excel file.

   Public Sub MultipleQueries()

Dim i As Integer
Dim Mailer As Database
Dim rs1 As Recordset
Dim rs2 As Recordset
Dim qdf As QueryDef

Set Mailer = CurrentDb
Set rs1 = Mailer.OpenRecordset("MailerData")
Set qdf = Mailer.CreateQueryDef("CCspl", "PARAMETERS CostCentre Text ( 255 );SELECT MonthlyFteData.CostCentre, MonthlyFteData.EmpName, MonthlyFteData.Workload FROM MonthlyFteData WHERE (((MonthlyFteData.CostCentre)=[CostCentre]))")

For i = 0 To rs1.RecordCount - 1

qdf.Parameters("CostCentre") = rs1.Fields("CostCentre")

    Dim oExcel As Object
   Dim oBook As Object
   Dim oSheet As Object
   Set oExcel = CreateObject("Excel.Application")
   Set oBook = oExcel.Workbooks.Add
   Set oSheet = oBook.Worksheets(1)

Set rs2 = qdf.OpenRecordset()

With rs2

oSheet.Range("A2").CopyFromRecordset rs2
oBook.SaveAs "C:Users807140Downloads" & rs2.Fields("CostCentre") & ".xlsx"

rs2.Close
oExcel.Quit
Set oExcel = Nothing

End With

rs1.MoveNext
Next i

qdf.Close
Set qdf = Nothing
rs1.Close

End Sub

But I get the Runtime Error 3021 — No Current Record

I substituted the

oSheet.Range("A2").CopyFromRecordset rs2
oBook.SaveAs "C:Users807140Downloads" & rs2.Fields("CostCentre") & ".xlsx"

with

Debug.Print .RecordCount

And I do actually get the appropriate record count for rs2.

How can I fix my code to eliminate the error?

Community's user avatar

asked Jul 28, 2016 at 16:27

Eliseo Di Folco's user avatar

2

Don’t use For..Next loops with Recordsets. Use this:

Do While Not rs1.EOF
    ' do stuff with rs1
    rs1.MoveNext
Loop
rs1.close

And as Ryan wrote, Dim don’t belong into any loop, move them to the start of the sub.

If this doesn’t help, please tell us on which line the error occurs.

answered Jul 28, 2016 at 16:45

Andre's user avatar

AndreAndre

25.9k6 gold badges34 silver badges78 bronze badges

1

The 3021 error («No current record.») occurs at the second of these two lines:

oSheet.Range("A2").CopyFromRecordset rs2
oBook.SaveAs "C:Users807140Downloads" & rs2.Fields("CostCentre") & ".xlsx"

That happens because the rs2 recordset pointer is at EOF after you do CopyFromRecordset rs2. Then at SaveAs, you ask for rs2.Fields("CostCentre"), but there is no available record («no current record») when the recordset pointer is at EOF.

However the rs1.Fields("CostCentre") value you used as the query parameter when opening rs2 is still accessible. So you can make the error go away by asking for rs1.Fields("CostCentre") instead of rs2.Fields("CostCentre")

oBook.SaveAs "C:Users807140Downloads" & rs1.Fields("CostCentre") & ".xlsx"

answered Jul 28, 2016 at 20:50

HansUp's user avatar

HansUpHansUp

95.4k11 gold badges75 silver badges135 bronze badges

1

This code has a few issues pointed out by @Andre and Ryan.

You’re not reusing your Excel object, you’re re-dimming objects that should only be defined once, using a With that never gets referenced so it just adds to code with no benefit.

You’re also creating a parameter query on the fly in code — instead of creating it in SQL and saving it to be reused by name.

You can try this rewritten code and see if it works better for you. I do believe that a predefined query is the better way to go — and then I’d close the query inside the loop and reset it at the start each time. I’ve just seen weird stuff happen when querydefs are reused inside loops without resetting them.

Anyways give this a try — and report on specific line that causes error

Public Sub MultipleQueries()

    Dim i       As Integer
    Dim Mailer  As Database
    Dim rs1     As Recordset
    Dim rs2     As Recordset
    Dim qdf     As QueryDef

    Dim oExcel  As Object
    Dim oBook   As Object
    Dim oSheet  As Object

    ' Only Open and Close Excel once
    Set oExcel = CreateObject("Excel.Application")

    Set Mailer = CurrentDb
    Set rs1 = Mailer.OpenRecordset("MailerData")

    ' Ideally you'd put this create query ahead of time instead of dynamically
    Set qdf = Mailer.CreateQueryDef("CCspl", "PARAMETERS CostCentre Text ( 255 );SELECT MonthlyFteData.CostCentre, MonthlyFteData.EmpName, MonthlyFteData.Workload FROM MonthlyFteData WHERE (((MonthlyFteData.CostCentre)=[CostCentre]))")

    Do Until rs1.EOF

        ' Sometimes weird things happen when you reuse querydef with new parameters
        qdf.Parameters("CostCentre") = rs1.Fields("CostCentre")
        Set rs2 = qdf.OpenRecordset()

        If Not rs2.EOF Then
            Set oBook = oExcel.Workbooks.Add
            Set oSheet = oBook.Worksheets(1)

            oSheet.Range("A2").CopyFromRecordset rs2
            oBook.SaveAs "C:Users807140Downloads" & rs2.Fields("CostCentre") & ".xlsx"
        Else
            Msgbox "No Data Found for: " & rs1.Fields("CostCentre") 
            Exit Do
        End If

        rs2.Close

        Set rs2 = Nothing
        Set oBook = Nothing     
        Set oSheet = Nothing        

        rs1.MoveNext
    Loop

    oExcel.Quit

    qdf.Close
    rs1.Close
    Mailer.Close

    Set qdf = Nothing
    Set rs1 = Nothing
    Set Mailer = Nothing

    ' Remove Excel references
    Set oBook = Nothing
    Set oSheet = Nothing
    Set oExcel = Nothing

End Sub

answered Jul 28, 2016 at 17:09

dbmitch's user avatar

dbmitchdbmitch

5,3534 gold badges23 silver badges38 bronze badges

7

  • Home
  • VBForums
  • Visual Basic
  • Visual Basic 6 and Earlier
  • [RESOLVED] Run-Time Error ‘3021’ No Current Record Found

  1. Oct 20th, 2014, 12:59 PM


    #1

    vb6coder14 is offline

    Thread Starter


    Hyperactive Member


    Resolved [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

    Code:

    Option Explicit
    
    Public Sub modDeterminePrice()
    
    
        On Error GoTo ErrorRoutine
    
    
        Dim dbCtrlRec As Database
        Dim rsCtrlRec As Recordset
     
    
        Set dbCtrlRec = OpenDatabase(App.Path & "" & "LLSYS.mdb")
        Set rsCtrlRec = dbCtrlRec.OpenRecordset("SYS_CONTROL_RECORD")
        
        MsgBox rsCtrlRec.Fields("mpSalesRankTier1")   '<- Failure occurs here
    
    
    Exit Sub
        
    ErrorRoutine:
    
        If Err.Number > 0 Then
            Call gscErrRtn.gscErrRtn
        End If
    
    End Sub

    Last edited by vb6coder14; Oct 20th, 2014 at 01:03 PM.


  2. Oct 20th, 2014, 01:43 PM


    #2

    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

    Code:

     Option Explicit
    
    Public Sub modDeterminePrice()
    
    
        On Error GoTo ErrorRoutine
    
    
        Dim dbCtrlRec As DAO.Database
        Dim rsCtrlRec As DAO.Recordset
     
    
        Set dbCtrlRec = OpenDatabase(App.Path & "" & "LLSYS.mdb")
        Set rsCtrlRec = dbCtrlRec.OpenRecordset("SYS_CONTROL_RECORD", dbOpenTable)
        
        MsgBox rsCtrlRec.Fields("mpSalesRankTier1")   '<- Failure occurs here
    
    
    Exit Sub
        
    ErrorRoutine:
    
        If Err.Number > 0 Then
            Call gscErrRtn.gscErrRtn
        End If
    
    End Sub

    JG

    … If your problem is fixed don’t forget to mark your threads as resolved using the Thread Tools menu …


  3. Oct 20th, 2014, 02:57 PM


    #3

    vb6coder14 is offline

    Thread Starter


    Hyperactive Member


    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.


  4. Oct 20th, 2014, 03:32 PM


    #4

    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 …»

    Take Care,
    Elroy


  5. Oct 20th, 2014, 03:42 PM


    #5

    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 :

    rsCtrlRec.MoveFirst

    to avoid BOF conditions

    4- Make sure you have records :

    msgbox rsCtrlRec.RecordCount

    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

    msgbox rsCtrlRec.Fields(0)

    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.


  6. Oct 20th, 2014, 04:03 PM


    #6

    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.


  7. Oct 20th, 2014, 04:16 PM


    #7

    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.

    dao360.chm


  8. Oct 20th, 2014, 04:25 PM


    #8

    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

    Dim a$

    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


  9. Oct 20th, 2014, 04:39 PM


    #9

    Re: Run-Time Error ‘3021’ No Current Record Found

    *laughs heartily*

    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.

    Take Care,
    Elroy


  10. Oct 20th, 2014, 04:40 PM


    #10

    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


  11. Oct 20th, 2014, 04:54 PM


    #11

    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.


  12. Oct 20th, 2014, 04:58 PM


    #12

    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.


  13. Oct 20th, 2014, 05:00 PM


    #13

    vb6coder14 is offline

    Thread Starter


    Hyperactive Member


    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?


  14. Oct 20th, 2014, 05:01 PM


    #14

    Re: Run-Time Error ‘3021’ No Current Record Found

    Hey Elroy…

    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


  15. Oct 20th, 2014, 05:03 PM


    #15

    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


  16. Oct 20th, 2014, 05:08 PM


    #16

    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


  17. Oct 20th, 2014, 05:13 PM


    #17

    Re: Run-Time Error ‘3021’ No Current Record Found

    Quote Originally Posted by Elroy
    View Post

    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.

    A recordset, depending on type & sql provider, can have an initial value of -1 if I recall correctly


  18. Oct 20th, 2014, 05:17 PM


    #18

    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


  19. Oct 20th, 2014, 05:24 PM


    #19

    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)


  20. Oct 20th, 2014, 05:28 PM


    #20

    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:

    Code:

    Public Function DoubleVal(fld As DAO.Field, Optional dDefault As Double = 0) As Double
        If IsNull(fld) Then
            DoubleVal = dDefault
        Else
            On Error Resume Next
            DoubleVal = fld
            On Error GoTo 0
        End If
    End Function

    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.


  21. Oct 20th, 2014, 05:35 PM


    #21

    Re: Run-Time Error ‘3021’ No Current Record Found

    Quote Originally Posted by Navion
    View Post

    … 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…

    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

    Code:

    ... assumption is recordset was returned. If EOF is false, should be on 1st record
       Do Until .EOF = True
          ... process
          .MoveNext
       Loop


  22. Oct 20th, 2014, 05:39 PM


    #22

    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.


  23. Oct 20th, 2014, 05:46 PM


    #23

    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.


  24. Oct 20th, 2014, 05:55 PM


    #24

    Re: Run-Time Error ‘3021’ No Current Record Found

    Quote Originally Posted by LaVolpe
    View Post

    A recordset, depending on type & sql provider, can have an initial value of -1 if I recall correctly

    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.


  25. Oct 20th, 2014, 06:40 PM


    #25

    Re: Run-Time Error ‘3021’ No Current Record Found

    When using DAO .RecordCount will give you the result only after a .MoveLast method

    JG

    … If your problem is fixed don’t forget to mark your threads as resolved using the Thread Tools menu …


  26. Oct 20th, 2014, 07:22 PM


    #26

    Re: Run-Time Error ‘3021’ No Current Record Found

    Quote Originally Posted by jggtz
    View Post

    When using DAO .RecordCount will give you the result only after a .MoveLast method

    Hummm good point, you are right about that. But if I remember correctly (I think I do, but maybe not), that does not apply to a recordset after an Index has been set.


  27. Oct 20th, 2014, 08:16 PM


    #27

    Re: Run-Time Error ‘3021’ No Current Record Found

    Actually, it still applies after an index has been set. It’s actually the only major bug in the DAO that I’m aware of. And, the situation is worse than just needing a .MoveLast execution. It still may not work. One thing that is true though is that .RecordCount will always be greater than zero if there are records. Beyond that, it’s just completely untrustworthy. Here are two functions I use instead:

    Code:

    Public Function bHasRecords(rs As Recordset) As Boolean
        ' The RecordCount property is generally bad news.
        ' It doesn't always work right even with a MoveLast.
        ' It does seem to be reliable as a check of the existence of ANY records.
        ' But even here, sometimes it will report -1 as "no records" rather than zero.
        bHasRecords = rs.RecordCount > 0
    End Function
    
    Public Function lExactRecordCount(rs As Recordset) As Long
        ' Be careful with this.  You can NOT be in an "EDIT" or "UPDATE" mode to use this.
        ' However, it will attempt to preserve the active record.
        Dim Bookmark As String
        Dim l As Long
        '
        If (rs.BOF = False) And (rs.EOF = False) Then Bookmark = rs.Bookmark
        '
        ' Count the records.
        If bHasRecords(rs) Then
            rs.MoveFirst
            l = 1
            Do
                rs.MoveNext
                If rs.EOF Then Exit Do
                l = l + 1
            Loop
        End If
        '
        If Len(Bookmark) <> 0 Then rs.Bookmark = Bookmark
        lExactRecordCount = l
    End Function


  28. Oct 20th, 2014, 08:19 PM


    #28

    Re: Run-Time Error ‘3021’ No Current Record Found

    Just as a further comment, the only other «bug» I know of in the DAO is that the default timing settings sometimes cause users to have unwanted collisions in a multi-user environment. If asked, I’ll post a fix that I’ve used for years and is working flawlessly in many installations.

    In fact, after staring at some code, I’ll outline the problem. The Jet Engine has «read ahead» and «cached write» options. In a multi-user environment, both of these can cause problems. Here, I’ll go ahead and post it. The following turns the «read ahead» and the «cached write» options off so that all reads and writes to/from an MDB file are truly coming off the server disk.

    Code:

        DBEngine.SetOption dbExclusiveAsyncDelay, 2000
        DBEngine.SetOption dbSharedAsyncDelay, 0
        DBEngine.SetOption dbFlushTransactionTimeout, 500
        '
        DBEngine.SetOption dbUserCommitSync, "yes"
        DBEngine.SetOption dbImplicitCommitSync, "yes"
        DBEngine.SetOption dbLockRetry, 20
        DBEngine.SetOption dbPageTimeout, 5000
        DBEngine.SetOption dbMaxLocksPerFile, 9500
        DBEngine.SetOption dbLockDelay, 100
        DBEngine.SetOption dbRecycleLVs, 0

    I’ve got about five pages of comments also in the procedure that calls this. If anyone wants it, let me know.

    Last edited by Elroy; Oct 20th, 2014 at 08:24 PM.


  29. Oct 20th, 2014, 08:21 PM


    #29

    Re: Run-Time Error ‘3021’ No Current Record Found

    I had an issue once using DAO in VB5 on an Access DB where the .MoveLast triggered an error message something like «Statement to complex to process»

    It took a bit to find the root of the problem, surely a simple move last can not be to complicated and the query was rather basic.

    Turned out to be a null value in a QTY field where who ever created the DB decided that QTY should be a text field and allow null values.

    Still not sure why it threw that error message but placing a value of 0 in the null fields corrected the problem then I added a default value of «0» to prevent the problem from happening again.


  30. Oct 20th, 2014, 08:23 PM


    #30

    vb6coder14 is offline

    Thread Starter


    Hyperactive Member


    Re: Run-Time Error ‘3021’ No Current Record Found

    This has been a great discussion and I’ve certainly picked up several valuable tips from reading all of the responses. Thank you all very much for your input. I’m marking this thread resolved now.


  31. Oct 20th, 2014, 11:24 PM


    #31

    Re: Run-Time Error ‘3021’ No Current Record Found

    Quote Originally Posted by Elroy
    View Post

    Actually, it still applies after an index has been set. It’s actually the only major bug in the DAO that I’m aware of. And, the situation is worse than just needing a .MoveLast execution. It still may not work. One thing that is true though is that .RecordCount will always be greater than zero if there are records. Beyond that, it’s just completely untrustworthy. Here are two functions I use instead:

    Again, only out of memories… I am pretty sure I have come across the problem before, and the DAO has a method to force its own reading of the whole dataset in order to return the proper RecordCount. Again not sure, but I will be browsing through some old code to see if i find it. Then as i finish writing these few words, certainty rises a notch of two because I remember testing the feature with very large number of records in a table. Will see.


  32. Oct 21st, 2014, 12:17 AM


    #32

    Re: [RESOLVED] Run-Time Error ‘3021’ No Current Record Found

    I remember working with some large tables in VB5 and using the .MoveLast and .Recordcount to set the max value of a progress bar before looping through the data. I do not recall having saw any issues there but it was long ago.


  33. Oct 21st, 2014, 08:01 AM


    #33

    Re: [RESOLVED] Run-Time Error ‘3021’ No Current Record Found

    I can absolutely promise that .MoveLast doesn’t always work to fix the .RecordCount problem. In my mind, I always thought it was an indexing thing. Say, you may have a PrimaryKey index on «Name». And then «AAAbernathy» is added first, and then «ZZZombie» added second, with 1000s of records subsequently added in between. In that case (through whatever btree or indexing method it internally uses), it comes nowhere close to actually «touching» and counting all the records to do a .MoveLast.

    But that’s all high supposition on my part. I just know .RecordCount isn’t accurate unless you «touch» every record in the database.

    And, long ago, I decided that, if I’m going to «touch» every record in the database, I’ll just count them myself.


  • Home
  • VBForums
  • Visual Basic
  • Visual Basic 6 and Earlier
  • [RESOLVED] Run-Time Error ‘3021’ No Current Record Found


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules


Click Here to Expand Forum to Full Width

Icon Ex Номер ошибки: Ошибка 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 ошибок и других проблем.

Почему происходит ошибка времени выполнения 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) | Лицензия | Политика защиты личных сведений | Условия | Удаление

hawk1

2 / 2 / 0

Регистрация: 11.01.2013

Сообщений: 213

1

01.04.2016, 13:57. Показов 2809. Ответов 3

Метки нет (Все метки)


Есть следующий код

Visual Basic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Private Sub ÎáùååÊîëè÷åñòâî_AfterUpdate()
   Dim qryGiven, qryReturned As QueryDef
   Dim rsGiven, rsReturned As DAO.Recordset
   Dim iGiven, iReturned As Byte
   
   If Me.NewRecord Then
      Me.ÂÍàëè÷èè.Value = Me.ÎáùååÊîëè÷åñòâî.Value
   Else
      Set qryGiven = CurrentDb.QueryDefs("Âûäàíî îáðàçöîâ")
      qryGiven.Parameters("ïÎáðàçåö").Value = CByte(Me.Êîä)
      Set rsGiven = qryGiven.OpenRecordset
      iGiven = rsGiven.Fields("Sum-Êîëè÷åñòâî").Value
      
      Set qryReturned = CurrentDb.QueryDefs("Âîçâðàùåíî îáðàçöîâ")
      qryReturned.Parameters("ïÎáðàçåö").Value = CByte(Me.Êîä)
      Set rsReturned = qryReturned.OpenRecordset
      iReturned = rsReturned.Fields("Sum-Êîëè÷åñòâî").Value
      
      Me.ÂÍàëè÷èè.Value = Me.ÎáùååÊîëè÷åñòâî.Value - iGiven + iReturned
   End If
End Sub

При попытке обратиться к полю запроса выскакивает ошибка Run-time error 3021 Текущая запись не найдена. В чем дело?

Вложения

Тип файла: rar Фото дети.rar (227.0 Кб, 4 просмотров)

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



Programming

Эксперт

94731 / 64177 / 26122

Регистрация: 12.04.2006

Сообщений: 116,782

01.04.2016, 13:57

3

mobile

Эксперт MS Access

26772 / 14451 / 3192

Регистрация: 28.04.2012

Сообщений: 15,782

01.04.2016, 14:18

2

Рекордсет пустой, потому ошибка. Попробуйте так

Visual Basic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Private Sub Form_AfterUpdate()
   Dim qryGiven, qryReturned As QueryDef
   Dim rsGiven, rsReturned As DAO.Recordset
   Dim iGiven, iReturned As Byte
   
   If Me.NewRecord Then
      Me.ВНаличии.Value = Me.ОбщееКоличество.Value
   Else
      Set qryGiven = CurrentDb.QueryDefs("Выдано образцов")
      qryGiven.Parameters("пОбразец").Value = Me.Код.Value
      Set rsGiven = qryGiven.OpenRecordset
      If Not rsGiven.EOF Then  'Проверяем рекордсет rsGiven на "пустоту"
        iGiven = rsGiven.Fields("[Sum-Количество]").Value
      Else
        iGiven = 0
      End If
      
      Set qryReturned = CurrentDb.QueryDefs("Возвращено образцов")
      qryReturned.Parameters("пОбразец").Value = Me.Код.Value
      Set rsReturned = qryReturned.OpenRecordset
      If Not rsReturned.EOF Then  'Проверяем rsReturned рекордсет на "пустоту"
        iReturned = rsReturned.Fields("[Sum-Количество]").Value
      Else
        iReturned = 0
      End If
      
      Me.ВНаличии.Value = Me.ОбщееКоличество.Value - iGiven + iReturned
   End If
End Sub



1



2 / 2 / 0

Регистрация: 11.01.2013

Сообщений: 213

01.04.2016, 16:30

 [ТС]

3

Теперь вылетает ошибка 2115 Макрос или функция,связанные со свойством «До обновления» или «Условие на значение» этого поля, не позволяет приложению Microsoft Access сохранить данные в этом поле, хотя там ничего не задано



0



шапоклякистка 8-го дня

3672 / 2232 / 391

Регистрация: 26.06.2015

Сообщений: 4,647

Записей в блоге: 1

01.04.2016, 19:38

4

Цитата
Сообщение от hawk1
Посмотреть сообщение

связанные со свойством «До обновления»

Ну и ищите причину в функции «до обновленя». Эта-то фунция после обновления:

Цитата
Сообщение от mobile
Посмотреть сообщение

Private Sub Form_AfterUpdate()



1



Recommended

  • 1. Download ASR Pro
  • 2. Follow the on-screen instructions to run a scan
  • 3. Restart your computer and wait for it to finish running the scan, then follow the on-screen instructions again to remove any viruses found by scanning your computer with ASR Pro
  • Speed up your PC today with this easy-to-use download.

    Over the past few days, some of our users have reported Microsoft Visual Basic Runtime Error 3021. g.”Runtime down ‘3021’ No current entry” This error occurs when you try to change the displayed location of the SysData folder from the Admin / Organization screen.

    Symptoms Runtime error ‘3021’ Outdated entry ‘This error occurs when you try to change the environment of the SysData shared folder in the Admin / Organization screen.

    Symptoms “Run-time error ‘3021’ No current entries” This error occurs when you try to change the location of the SysData public folder on the administrator / organization home screen.

    Summary:

    This blog will help you find the best solution to fix MS Access error 3021, which is absolutely not a recent registration problem. You

    How do I fix Runtime Error 3021?

    Adjust the spacing for any field group in the group asset group.Set the footer of the online community property group to No for the property associated with the field group.At the bottom of the group, you eliminate calculations.

    If yes, then this is not necessary.

    Just try most of the following fixes Rod mentioned and learn all the facts about that particular error code.

    Microsoft Access Information Does Not Record The Current Error

    An Access product consists of fields such as name, administration, and phone number. Essentially, a record is now commonly known as a string, but the field that composes it is also most commonly known as a column. MS Provides easy access to datasets such as adding new data, changingTake already popular data and remove unwanted parts in the table directly in the form of a table.

    But sometimes Access displays error 3021 – No Current Records when you try to access those records.

    Error Details:

    Practical Scenario Am:

    Hello

    I noticed this error while trying to find the entry for two agents. Initially it only worked with dinner table which just doesn’t return certificates, but now I am looking for 2 tables where the second table is returned with a label. When I debug the error, the bottom line item stops. I have attached the code as clearly as possible. Help me please.

    varReturnValue = CurrentDb.OpenRecordset (Request) (0)

    Symptoms Of Access Error 3021:

    How to fix runtime error 3021?

    Change the Group team property to Interval for one of these field groups.Change the group properties in the group footer to None for any of the topic groups.Eliminates group stones of the foot.

    See the following notes to easily identify the underlying runtime error 3021 No Records Updated.

    • This error usually occurs when the player tries to change the location of the SysData shared folder on the admin / organization screen.
    • You receive a “No Current Records” error in MS Access when you try to view or print Create this report using the Print command, or perhaps even preview it, and then switch between the pages of the report.

    What Are The Reasons For The Current “Access Without Registration” Error?

    Here are the root causes of runtime error 3021 in Access 2003/2007/2010/2013/2016.

    • The root cause of this “No access to the current record” message is because the path / drive destination for the shared SysData storage is incorrect or extremely incorrect.
    • Insufficient permission to edit the file, most of which store the shared location of the SysData.
    • You receive a “No Current Records” error when you might be trying to print the preview and report, families switch between account pages in Access.
    • If your report is split into several fields.
    • You selected Yes in the group property list of the group footer.
    • You may have done calculations in the group footer in the usual way.
    • In the property group set to Group By, you selected Any Value.

    How To Find A Concha New Entry In Access?

    If ms, your Access database is literally showing a “No current records” problem when trying to account for access records. We then suggest that you first find specific records in tables or forms using the Find Invoice function in the Find and Replace dialog box.

    microsoft visual basic runtime error 3021

    Well, it’s more efficient to browse through the specific posts you want to find along the way and match the detailed criteria well. Search terms and test operators such as equal or contains. AND

    Note:

    The
    microsoft visual basic runtime error 3021

    find Replace dialog can also be used whenever the table or expansion is currently displaying data. It is also clean if no entry was found solely due to the filtering method.

    Steps To Find A Specific Entry In Access:

    • Open the first few milliseconds in total, open a spreadsheet or form, then tap on all the fields you want to highlight for.
    • Now click on the tab that is in the search group with the option “Find” or press CTRL + F.
    • A dialog box will open.but “Find and Replace” with the “Find” button selected.
    • In the “Find” box, this is definitely the spelling you should be looking for.
    • Update the field if you want to search, finding the base table if necessary. Select the appropriate option from the Search in list.

    Tip. If the list matches, your rating operator is displayed (for example, “equals” or “contains”). To see a larger entry in the hit list, go to Any part of the field.

    • From your awesome search list, select the “All” option and then click the “Find Next” button.
    • When the element you are looking for is highlighted, click the Undo button in our own Find and Replace dialog box to close the dialog. All
    • After these large ones, all archives will be highlighted that go well with your storyline.

    If you cannot find the entry you are looking for, use the Find tab in the Find and Replace dialog box. Then try to resolve access error 3021 Outdated entry. This will definitely solve your problem.

    Like Change Runtime Error 3021: No Current Data Record?

    Method 1:

    How do I fix Runtime Error 3021?

    For now, change this group to group ownership for one of the professional groups.Change the Group Footer property of the group to None for one of the Topic Groups.From the group footer, you shorten the calculations.

    Well, you can fix runtime error 3021 No current record almost immediately by using one of the following methods:

    • Change the specific group property “Group to” to “Range” for only one of the field groups.
    • Change the footer group property to None for the property associated with the field group.
    • Eliminate bottom calculations in Group.Fix

    As for the main source of the problem, try each person involved in these methods in turn until you stop getting a specific error message.

    Access Method 2:

    This “No Current Records” error occurs after the search methods or, I would say, the search method have failed. When the original record contains no record or has been deleted in some way.

    Move to select another entry and try again. If the recordset is empty, you will not be able to rank the current record. So now check the BOF and EOF properties.

    Method 3:

    Also make sure that everything is workingThese workstations are at the same version / service pack level as the other workstations. Instead:

    • Search for FRx32.exe in the target directory, which in turn will open FRx Designer.
    • Now edit the FRx32.File cfg in this directory using Notepad to display the correct Office SysData with UNC mapping.

    ATTENTION! Do not trim or edit the FRx32.cfg file before opening FRx directly. This can cause a loss of bandwidth on the shared Sysdata location.

    • Open FRx after completely saving the FRx32.cfg file.

    Summary:

    All of the above fixes will surely fix your inability to access the current record. But before you go to manual fixes, first do a simple search using the Find tab in the Find and Replace dialog box.

    After trying to fix all of the above fixes, please share your experience in the comments section of the page. You can also share other Access database related topics.

    Recommended

    Is your PC running slow? Do you have problems starting up Windows? Don’t despair! ASR Pro is the solution for you. This powerful and easy-to-use tool will diagnose and repair your PC, increasing system performance, optimizing memory, and improving security in the process. So don’t wait — download ASR Pro today!

  • 1. Download ASR Pro
  • 2. Follow the on-screen instructions to run a scan
  • 3. Restart your computer and wait for it to finish running the scan, then follow the on-screen instructions again to remove any viruses found by scanning your computer with ASR Pro
  • Troubleshoot Microsoft Access
    Runsf Scan the database with the Stellar Access Database Repair Tool to repair an inconsistent Access database. If the restore process does reset to the overall state of the database after the search completes, all errors will be cleared.

    By hovering over the button above the installation and Stellar Repair for Access (14 MB, $ 6 79), I confirm that I have read and accept the End User License Agreement and Privacy Policy of this site.

    Software problems repairs still occur very well for access with repairs:

    This software provides easy recovery and recovery of ACCDB and MDB database and recovers all items including tables, reports, queries, records, variants and indexes as well as modules, macros, etc. Fix Microsoft Access in 3 easy steps:

    Pearson Willie

    Pearson Willey is a website content writer and long-term content developer. Besides the fact that she is also an avid reader. So he knows very wellhow to get you to write engaging content for your subscribers. For him, writing is a growth effect. He loves learning about MS Access and writing about it on tech blogs.

    Speed up your PC today with this easy-to-use download.

    Oshibka Vypolneniya Microsoft Visual Basic 3021
    Microsoft Visual Basic Runtime Fout 3021
    Error 3021 De Tiempo De Ejecucion De Microsoft Visual Basic
    Erro De Tempo De Execucao Do Microsoft Visual Basic 3021
    Microsoft Visual Basic Blad Wykonawczy 3021
    Microsoft Visual Basic Runtime Error 3021
    Erreur D Execution Microsoft Visual Basic 3021
    Microsoft Visual Basic Laufzeitfehler 3021
    Microsoft Visual Basic 런타임 오류 3021
    Errore Di Runtime Di Microsoft Visual Basic 3021

    Автор Сообщение

    Заголовок сообщения: RUN-Time error «3021»

    СообщениеДобавлено: Пн авг 31, 2015 4:47 pm 

    Не в сети



    Зарегистрирован: Ср фев 13, 2013 8:53 am
    Сообщения: 56
    Откуда (Город): г.Ставрополь


    Клиент работает с Микроинвест больше года. База MS SQL Server. Примерно месяц назад стали жаловаться на то, что (со слов персонала) при выбора стола в Лайт при открытии нового заказа выходит сообщение «RUN-Time error ‘3021’ BOF или EOF имеет значение True, либо текущая запись удалена. Для выполнения операции требуется текущая запись.». В логе по этому поводу ничего нет — последнее сообщение в лог-файле датировано сентябрем 2014. Воспроизвести ошибку на месте не удалось. Обновил Лайт до последней версии. Несколько дней после этого не звонили. Но, сегодня снова звонок: уже дважды были такие сообщения. Перезагружают POS (на нем же и SQL Server), после этого работают нормально. Нормально до следующего, непредсказуемого раза. Какие есть мысли? Извечные вопросы: что делать и кто виноват?

    _________________

    http://www.siera.ru

    Skype: siera-mi

    Вернуться к началу

    Профиль  

    Дмитрий Акбаров

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн авг 31, 2015 5:04 pm 

    Не в сети



    Зарегистрирован: Вт дек 14, 2010 10:03 am
    Сообщения: 7646
    Откуда (Город): Болгария, Варна

    Автоматизатор

    Здравствуйте.
    Отправьте мне базу на анализ.

    Вернуться к началу

    Профиль  

    P0ZiTR0N

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн авг 31, 2015 8:20 pm 



    Зарегистрирован: Вт апр 03, 2012 12:49 pm
    Сообщения: 12864
    Откуда (Город): София, Болгария

    Автоматизатор

    Кроме того, укажите, используете ли антивирус на фронте и какое железо?
    В какой момент падает ошибка — после старта; после прохода чек-листа; в момент работы; при нажатии на какие-то кнопки?

    _________________
    [База знаний]|[Бесплатная помощь]|[Веб склад]
    ▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬
    Telegram: 359887637163. 09:00-17:30 GMT+2. Ответ от 1 минуты до 3 часов в рабочее время!
    ▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬
    Удаленный доступ через http://microinvest.net/pub/mremote.exe или Anydesk 29 EUR/час

    Вернуться к началу

    Профиль  

    cmekaem

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 12:03 am 

    Не в сети



    Зарегистрирован: Чт май 15, 2014 1:56 am
    Сообщения: 100
    Откуда (Город): n/a

    Клиент

    Здравствуйте. Подскажите пожалуйста как справиться с данной проблемой?

    Вернуться к началу

    Профиль  

    Анастасия Акбарова

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 6:31 am 

    Не в сети



    Зарегистрирован: Вт авг 04, 2015 7:11 am
    Сообщения: 2636
    Откуда (Город): Болгария, Варна

    Автоматизатор

    Здравствуйте.

    Подробнее, какя проблема?
    В какой момент проявляется?

    Вернуться к началу

    Профиль  

    cmekaem

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 11:31 am 

    Не в сети



    Зарегистрирован: Чт май 15, 2014 1:56 am
    Сообщения: 100
    Откуда (Город): n/a

    Клиент

    Программа запускается всегда. После нескольких бегунков или чеков, перестают выходить и те и другие, а при блокировке программы выдает такую ошибку.

    Вложения:
    IMG_20170115_170935415.jpg
    IMG_20170115_170935415.jpg [ 378 КБ | Просмотров: 1579 ]

    Вернуться к началу

    Профиль  

    cmekaem

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 11:33 am 

    Не в сети



    Зарегистрирован: Чт май 15, 2014 1:56 am
    Сообщения: 100
    Откуда (Город): n/a

    Клиент

    на этом же сервере (подписчик) работает 7 касс магазина, но в другой базе. никаких ошибок нет.

    Вернуться к началу

    Профиль  

    Виктор Павлов

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 7:00 pm 



    Зарегистрирован: Ср окт 24, 2007 5:56 pm
    Сообщения: 17812
    Откуда (Город): София


    Вернуться к началу

    Профиль  

    cmekaem

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 7:19 pm 

    Не в сети



    Зарегистрирован: Чт май 15, 2014 1:56 am
    Сообщения: 100
    Откуда (Город): n/a

    Клиент

    Сейчас проверю, отпишусь.

    Вернуться к началу

    Профиль  

    cmekaem

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 8:18 pm 

    Не в сети



    Зарегистрирован: Чт май 15, 2014 1:56 am
    Сообщения: 100
    Откуда (Город): n/a

    Клиент

    Проверил. Все равно выбивает.

    Вернуться к началу

    Профиль  

    Дмитрий Акбаров

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 8:28 pm 

    Не в сети



    Зарегистрирован: Вт дек 14, 2010 10:03 am
    Сообщения: 7646
    Откуда (Город): Болгария, Варна

    Автоматизатор

    Группы товаров указаны в настройках?
    Если да, повторно укажите.
    Прикрепите конфиг и лог файл.

    Вернуться к началу

    Профиль  

    cmekaem

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 8:37 pm 

    Не в сети



    Зарегистрирован: Чт май 15, 2014 1:56 am
    Сообщения: 100
    Откуда (Город): n/a

    Клиент

    Вернуться к началу

    Профиль  

    cmekaem

    Заголовок сообщения: Re: RUN-Time error «3021»

    СообщениеДобавлено: Пн янв 16, 2017 9:43 pm 

    Не в сети



    Зарегистрирован: Чт май 15, 2014 1:56 am
    Сообщения: 100
    Откуда (Город): n/a

    Клиент

    Спасибо за помощь. Работает, проблема решена. После закрытия периода удалили товары не участвовавшие в операциях, а с ними и оставшиеся пустые группы. В лайте были выбраны группы, и одна из выбранных была удалена. Выбрал группы по новой и все заработало. Помощь оказана и Проблема решена в течении дня. Еще раз спасибо.

    Вернуться к началу

    Профиль  


    Автор
    Тема: Ошибка run-time error 3021  (Прочитано 11044 раз)


    Только запускаем Лавину.
    Чтобы криворукие операторы не напортачили с с системником, к которому подключен центральный модем, купили отдельный, который планируем держать в серверной. Будет три рабочих места: два пульта нижнего уровня и один верхнего. Только для этих компьютеров по локалке будет открыт доступ к базе данных. Кроме того с рабочего места администратора будут программироваться коммуникаторы, ключи, добавляться приборы и т.д. В общем-то эта система уже была опробована именно в таком виде.
    Пытались администратору сделать удаленный доступ к рабочему столу ЦМ (компа, который стоит в серверной). Это нужно по двум причинам: серверная постоянно закрыта и находится на другом этаже, во-вторых на том компе только один СОМ-порт.
    Теперь вроде-бы доступ к рабочему столу настроили, а вот при добавлении объектового коммуникатора с другого компьютера начались непонятные проблемы. В АРМ администратора (после того как указываем тип модема) АРМ начинает с ним общаться. Светодиоды перемигиваются и после этого АРМ выдает «Ошибка run-time error 3021: Текущая запись отсутствует» Если нажимаем «Ок» АРМ закрывается без предупреждений. И так все время. Переустановка программы в режиме исправления ничего не дала.
    Что можете посоветовать?!     


    Записан


    Записан


    Лавина 2. Приобретали в начале 2010-го


    Записан


    Спрошу по-другому: версия ПО какая?


    Записан


    1.Попробуйте поставить Лавину 6.2.3.(скачать можно на сайте…) 2.У меня эта ошибка вылезает когда комп администратора теряет связь с компьютером на котором установлена база…Получали в «Сервер Guardant Net» ini-файл клиента?  
    По отдельному серверу-была такая мысль, но отказались.Иногда возникает потребность перезагрузки: 1.ГранитЛ2 (при большом количестве сообщений с объектов он виснет) 2.Программы (иногда отключается IP канал, при этом в модуле контроля системы все в норме, но сообщения не проходят)…Все эти проблемы решают операторы, а если взвалить эти проблемы на администратора…пока он приедет…перезагрузит…объекты будут без охраны…
    ДВА пульта нижнего уровня-это или две лицензии или количество объектов для примера на первом рабочем месте-с 1- 150 на втором с 150 по 300…


    Записан


    To 48gik: Отправьте базу разработчикам на анализ. Говорят помогает…


    Записан


    Извиняюсь… Лавина 6.2.2
    По пультам именно так и будет: 1-й с 1 по 120 объект, второй с 121 по 240 например…


    Записан


    Лукаво мудрствовать не стал… Запустил файл переустановки программы и в режиме исправления ошибки переустановил Лавину. Заново внес все данные (благо там было-то лишь ЦМ и 1 объектовый прибор).
    Шайтан заработал! Ошибка пропала. Модули программируются без проблем.
     


    Записан


    А версия 6.2.3 лучше! В ней можно работать с АРМ инженера.Пример:пульт в Тюмени, а инженер в Тобольске.Раньше- из Тобольска просили ТМ добавить…программировали в Тюмени ТМ (и + соответственно мастер-ключ) и отправляли в Тобольск.Сейчас скидываем по эл.почте базу инженера, он в Тобольске сам прописывает что ему необходимо и меняет запрограммированные приборы.Потом отправляет по эл.почте в Тюмень и мы прописываем в Лавине его изменения (на версии 6.2.2 у меня это не получалось).


    Записан


    А как же программирование другим ключом?
    Решили эту проблему?


    Записан


    Если честно-то не обращаем на это внимание…


    Записан


    Nick63
    версия 6.2.3 лучше!
    Для моего случая такие заморочки не нужны, достаточно одного АРМ Администратора. Объекты на расстоянии нескольких км в одном месте.


    Записан


    когда исправят вылет из программы при печати карточки прибора????

    События приложений выдает:

    Ошибка приложения integradm.exe, версия 6.2.0.2, модуль msjet40.dll, версия 4.0.9511.0, адрес 0x0003931f.

    Приложение C:Program FilesLavina622ARM AdminIntegrAdm.exe вызвало ошибку Ошибка в 29/12/2011 @ 09:44:49.484 Вызвано исключение c0000005 по адресу 1B03931F (MSJET40!Ordinal159)

    сделайте уже чтонибудь.


    Записан


    Записан


    надо будет скачать и попробовать…


    Записан

    Понравилась статья? Поделить с друзьями:
  • Run time error 3 stack heap collision insufficient stack size
  • Run time error 2147467259 80004005 vba excel
  • Run time error 2147417848 80010108 vba excel
  • Run time error 2147319779
  • Run time error 2147221040 800401d0