Runtime error 3421

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

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

О программе Runtime Ошибка 3421

Время выполнения Ошибка 3421 происходит, когда Microsoft Access дает сбой или падает во время запуска, отсюда и название. Это не обязательно означает, что код был каким-то образом поврежден, просто он не сработал во время выполнения. Такая ошибка появляется на экране в виде раздражающего уведомления, если ее не устранить. Вот симптомы, причины и способы устранения проблемы.

Определения (Бета)

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

  • Access — НЕ ИСПОЛЬЗУЙТЕ этот тег для Microsoft Access, используйте вместо него [ms-access]
  • Преобразование типов — Преобразование типов — это способ неявного или явного изменения объекта одного типа данных на другой
  • Access . Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, которая обычно объединяет реляционное ядро ​​СУБД Microsoft JetACE с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
  • Доступ к Microsoft — Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, который обычно сочетает в себе реляционное ядро ​​СУБД Microsoft JetACE с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
  • Тип . Типы и системы типов используются для обеспечения уровней абстракции в программах.

Симптомы Ошибка 3421 — Ошибка Microsoft Access 3421

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Метод 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 3421 (Microsoft Access Error 3421) — Data type conversion error.
Wie beheben Fehler 3421 (Microsoft Access-Fehler 3421) — Fehler bei der Datentypkonvertierung.
Come fissare Errore 3421 (Errore di Microsoft Access 3421) — Errore di conversione del tipo di dati.
Hoe maak je Fout 3421 (Microsoft Access-fout 3421) — Conversiefout van gegevenstype.
Comment réparer Erreur 3421 (Erreur d’accès Microsoft 3421) — Erreur de conversion de type de données.
어떻게 고치는 지 오류 3421 (마이크로소프트 액세스 오류 3421) — 데이터 유형 변환 오류입니다.
Como corrigir o Erro 3421 (Erro 3421 do Microsoft Access) — Erro de conversão de tipo de dados.
Hur man åtgärdar Fel 3421 (Microsoft Access-fel 3421) — Konverteringsfel för datatyp.
Jak naprawić Błąd 3421 (Błąd Microsoft Access 3421) — Błąd konwersji typu danych.
Cómo arreglar Error 3421 (Error de Microsoft Access 3421) — Error de conversión de tipo de datos.

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

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

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

15/12/22 12:20 : Пользователь iPhone проголосовал за то, что метод восстановления 3 работает для него.

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

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

ШАГ 1:

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

ШАГ 2:

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

ШАГ 3:

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

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

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

Требования

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

ID статьи: ACX06851RU

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

Совет по увеличению скорости #10

Очистка вашего реестра:

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

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

Icon Ex Error Number: Error 3421
Error Name: Microsoft Access Error 3421
Error Description: Data type conversion error.
Developer: Microsoft Corporation
Software: Microsoft Access
Applies to: Windows XP, Vista, 7, 8, 10, 11

Microsoft Access Error 3421 Assessment

Usually, PC practitioners and support staff know Microsoft Access Error 3421 as a form of «runtime error». Developers expend a lot of time and effort to write code to make sure Microsoft Access is stable before the product is sold. However, it is possible that sometimes errors like error 3421 do not get addressed, even at this stage.

«Data type conversion error.» might occur to Microsoft Access users even through normal use of the application. At the time the error 3421 is encountered, the end-user can report the issue to Microsoft Corporation. Microsoft Corporation then would need to correct these errors in the master source code and provide a modified version for downloading. To correct such error 3421 errors, an installable software update will be released from the software provider.

What Causes Error 3421 at Runtime?

You will have a failure during execution of Microsoft Access if you run into Microsoft Access Error 3421 during runtime. The following three most significant causes of error 3421 runtime errors include:

Error 3421 Crash — Error number will trigger computer system lock-up, preventing you from using the program. This typically occurs when Microsoft Access cannot recognize that it is given an incorrect input, or is unaware of what it is supposed to produce.

Microsoft Access Error 3421 Memory Leak — When a Microsoft Access memory leak happens, it will result in the operating system running sluggish due to a lack of system resources. Memory corruption and other potential errors in code may happen when the memory is treated incorrectly.

Error 3421 Logic Error — A Microsoft Access logic error happens when it produces the wrong output, despite the user providing the correct input. This happens when Microsoft Corporation’s source code causes a flaw in information handling.

Microsoft Access Error 3421 issues are often the result of the file that is missing, deleted, or accidentally moved from Microsoft Access’s original installed location. Although annoying, these issues can usually be easily remedied through replacing the problem Microsoft Corporation file. In addition, if your Microsoft Access Error 3421 error was due to a removed malware infection, we recommend running a registry scan to clean up any invalid file path references created by the malicious program.

Classic Microsoft Access Error 3421 Problems

Encountered Microsoft Access Error 3421 Problems with Microsoft Access Include:

  • «Microsoft Access Error 3421 Software Error.»
  • «Microsoft Access Error 3421 not a Win32 program.»
  • «Sorry, Microsoft Access Error 3421 encountered a problem.»
  • «Cannot find Microsoft Access Error 3421.»
  • «Microsoft Access Error 3421 can’t be found.»
  • «Problem starting application: Microsoft Access Error 3421.»
  • «Microsoft Access Error 3421 is not running.»
  • «Microsoft Access Error 3421 halted.»
  • «Faulty Program Path: Microsoft Access Error 3421.»

Usually Microsoft Access Error 3421 errors with Microsoft Access happen during startup or shutdown, while Microsoft Access Error 3421 related programs are running, or rarely during the OS update sequence. Notating when Microsoft Access Error 3421 errors occur is paramount in finding the cause of the Microsoft Access problems and reporting them to Microsoft Corporation for help.

Microsoft Access Error 3421 Problem Causes

Microsoft Access Error 3421 problems can be attributed to corrupt or missing files, invalid registry entries associated with Microsoft Access Error 3421, or a virus / malware infection.

Specifically, issues with Microsoft Access Error 3421 caused by:

  • Microsoft Access Error 3421 registry keys invalid / corrupted.
  • Malware infestation corrupted Microsoft Access Error 3421 file.
  • Malicious deletion (or mistaken) of Microsoft Access Error 3421 by another application (not Microsoft Access).
  • Another software in conflict with Microsoft Access, Microsoft Access Error 3421, or shared references.
  • Corrupted installation or download of Microsoft Access (Microsoft Access Error 3421).

Product by Solvusoft

Download Now
WinThruster 2022 — Scan your PC for computer errors.

Compatible with Windows 11, 10, 8, 7, Vista, XP and 2000

Optional Offer for WinThruster by Solvusoft | EULA | Privacy Policy | Terms | Uninstall

  • Remove From My Forums
  • Question

  • Hello, trying to run Db.QueryDefs to pull data from a query and receiving Run time error. Changed data set (
    Dim sQuery   As String) to Long, Double, String and still giving me an error. The data that I need is «string» or «number» like 19.20 or so.

    Thank you and have a good day!

    Dim Db              As Database  ‘current database
    Dim RS              As Recordset    ‘holds query result
    Dim sQuery       As String
    Dim sPercentage  As String
    Dim qdf             As QueryDef

    Set Db = CurrentDb()

    Set qdf = Db.QueryDefs(«qryPercentage»)

    sQuery = «SELECT qryPercentage.Convert FROM qryPercentage;»

    Set RS = qdf.OpenRecordset(sQuery)

    sPercentage = RS.Fields(«Convert»).Value


    JayZ

    • Edited by

      Monday, November 2, 2020 8:06 PM

Answers

  • Thank you so much for those of you who assisted me with this. Have a great day!

    This is a link that Microsoft MVP suggested (See https://www.devhut.net/2011/11/07/ms-access-vba-run-parameter-query-in-vba/) 

    Is working now. 

    Dim db              As DAO.Database
    Dim qdf             As DAO.QueryDef
    Dim prm            As DAO.Parameter
    Dim rs               As DAO.Recordset
    Dim sPercentage  As Integer

        Set db = CurrentDb

        Set qdf = db.QueryDefs(«qryPercentage»)

        For Each prm In qdf.Parameters
            prm = Eval(prm.Name)
             Debug.Print prm.Name
        Next prm

        Set rs = qdf.OpenRecordset

        ‘Work with the recordset
        sPercentage = rs.Fields(«Convert»).Value


    JayZ

    • Marked as answer by
      Radio Fixer
      Monday, November 9, 2020 3:53 PM

Topic: Runtime Error 3421 when using a program that worked days ago  (Read 2273 times)

0 Members and 1 Guest are viewing this topic.

robdiqulous

Hello,
So I just started an IT support position at a company and one of the first big problems I have, I have no idea how to solve it. I have been looking and trying things for days. Here it goes…

They had this program written just for them. You put in a model number and quantity and things, then it accesses an Access database, and it will print out a page with the information on it. They only use this program from 1 computer and it is basically all that it does. Apparently one day they went to go do the same thing they always do, and when they go to print you get a Runtime Error 3421: Data type conversion error. While looking it up it looks like people have had this issue while making changes in their code and what not but I don’t even have access to the source code. I don’t know programming anyway. They can’t remember if they have ever gotten this error code before but when they did get error codes, it would be because they wrote a letter or something instead of a number in one of the boxes. Normally they would just go into the access database and delete the mistake and it would work again. My boss said he did that this time and it is still not working.

The program and the file is on a shared drive coming from the server.

ALSO, when I go into the Access database they are using, I get an error saying that it cannot access the reference to «mail.ocx» version 1.0. When I go into the references it says it is MISSING: TTC mail control or something like that. It says the files location is C:WINNTsystem32. I guess that would be on the server and since it is coming from the shared server it recognizes the C: drive on the server. I am not even sure if these are related at all but I thought I would mention it. They don’t know if that error was there before or not. I don’t know how to fix that error either. I try to uncheck the box and see what happens but I am using Access 2007 and it says that this database was made on an older access so I can’t make design changes.

Let me know if you have any more questions I have been banging my head on this for a while. I would love if someone can figure this out!

 Thanks,

 Rob


Logged


Spoiler

This maybe text in a numerical field in the database. Once entered the field is locked. You will need someone to open the DB in access and look for the fields that are numerical and see if they can find some bad data.


Logged

Whenever I watch TV and I see those poor starving kids all over the world, I can’t help but cry. I mean I would love to be skinny like that, but not with all those flies and death and stuff.» — Mariah Carey, Pop Singer


Geek-9pm

Is the PC in question running Windows XP?
What is the make and model?
If the problem is with the custom program, it is  unlikely you can fix it in a short time. Lack of documentation makes it out of reach.


Logged


robdiqulous

This maybe text in a numerical field in the database. Once entered the field is locked. You will need someone to open the DB in access and look for the fields that are numerical and see if they can find some bad data.

Yeah that is what they used to do. And my boss did it and it didn’t work. Then we even deleted all of the data just to make sure and it still isn’t working. Apparently though he used to go through and delete the bad entries and it would start working again. No luck this time even when we deleted all of the entries.


Logged


robdiqulous

Is the PC in question running Windows XP?
What is the make and model?
If the problem is with the custom program, it is  unlikely you can fix it in a short time. Lack of documentation makes it out of reach.

The computer we are using is a Optiplex 3020. Not too old. Not compared to these other computers. It is running windows 7 pro. Like I said, they have been using it and would delete the entries if they had this problem before, but they don’t know if it is the same exact error code or not because no one really payed attention. And yes it is a custom program only we have. I guess the old IT guy wrote it for them. I have a file that is the same size as the program (which are both like 205 kb) I am not sure if that would be the source code or not. I don’t have the right program to view it. There is no file extension that I can find either. There are 2 other files that are .rpt files though.

All of this is coming from the shared drive on the server. Do you think this has anything to do with the mail.ocx not being able to be found? I can’t find a single thing on google about that ocx either.

Thank you for the replies so far anything helps! I am at the end of my wits with this.


Logged


  • Home
  • VBForums
  • Visual Basic
  • Office Development
  • VBA error: Run-time error 3421: Data type conversion error.

  1. Jul 4th, 2014, 09:48 AM


    #1

    Arcadia01 is offline

    Thread Starter


    Junior Member


    VBA error: Run-time error 3421: Data type conversion error.

    The whole day i’m strugeling to solve this issue but it seems i can’t come any further with this

    In Access i have made a report with a button that has to open a e-mail message and insert the filtered data of the training days.

    But the problem is i can’t do this because the 2 parameters from the query that is linked to the report are blocking it. And i used the vba code below that should be working but it does not and it gives the following error message:


    VBA error Run-time error 3421: Data type conversion error.

    And the following line is highlighted in yellow:

    qdf.Parameters(«[van: dd-mm-yy]») = Format(InputBox(«van: dd-mm-yy», «Start Date», Format(Date, «dd-mm-yy»)), «#mm/dd/yyyy#»)

    The SQL query that is linked with the report is as follow

    Code:

    PARAMETERS [van: dd-mm-yy] DateTime, [tot: dd-mm-yy] DateTime;
    SELECT TrainingCalender.Title, TrainingCalender.Location, TrainingCalender.[Start Time], TrainingCalender.[End Time], TrainingCalender.Description, [Training description].[Training description]
    FROM TrainingCalender LEFT JOIN [Training description] ON TrainingCalender.Title = [Training description].Title
    WHERE (((TrainingCalender.[Start Time])>=[van: dd-mm-yy]) AND ((TrainingCalender.[End Time])<=[tot: dd-mm-yy]));

    And below you can see the VBA code i’m using:

    Code:

    Private Sub Command18_Click()
        Dim objOutlook As Outlook.Application
        Dim objOutlookMsg As Outlook.MailItem
        Dim objOutlookRecip As Outlook.Recipient
        Dim objOutlookAttach As Outlook.Attachment
        Dim qry As QueryDef
        Dim rst As Recordset
    
        Dim db As DAO.Database
        Dim qdf As DAO.QueryDef
        Dim prm As Parameter
    
        ' Create the Outlook session.
        Set objOutlook = CreateObject("Outlook.Application")
    
        ' Create the message.
        Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
    
        With objOutlookMsg
            ' Add the To recipient(s) to the message.
            Set objOutlookRecip = .Recipients.Add("person@mail.com")
            objOutlookRecip.Type = olTo
    
            ' Add the CC recipient(s) to the message.
            Set objOutlookRecip = .Recipients.Add("Michael Syama")
            objOutlookRecip.Type = olCC
    
            ' Add the BCC recipient(s) to the message.
            Set objOutlookRecip = .Recipients.Add("Andrew Fler")
            objOutlookRecip.Type = olBCC
    
            ' Set the Subject, Body, and Importance of the message.
            .Subject = "Training dates"
    
            .BodyFormat = olFormatHTML
    
            .HTMLBody = "<p><strong>Dear Colleague,</strong></p>" & _
                        "Welcome to our we updated training curricula as well as a much better training infrastructure." & _
                        "<p>Please see the attachment for the dates! </p>" & _
                        "<b><strong>With Kind regards,</strong></b>" & _
                        "<p> Name <br> </p>" & _
                        "<b> Below you can see the upcoming training schedule: </b><br> "
    
            Set db = CurrentDb
            Set qdf = db.QueryDefs("TrainingCalender Query")
            qdf.Parameters("[van: dd-mm-yy]") = Format(InputBox("van: dd-mm-yy", "Start Date", Format(Date, "dd-mm-yy")), "#mm/dd/yyyy#")
            qdf.Parameters("[tot: dd-mm-yy]") = Format(InputBox("tot: dd-mm-yy", "End Date", Format(Date, "dd-mm-yy")), "#mm/dd/yyyy#")
            Set rst = qdf.OpenRecordset()
    
            Do Until rst.EOF
                .HTMLBody = .HTMLBody & " <TABLE BORDER=4 RULES=NONE FRAME=BOX> " & " " & _
                            " <br>  <p> " & " Training: " & rst![Title] & " " & " <br> " & _
                            " Start Time: " & rst![Start Time] & " " & " <br> " & " Place: " & rst![Location] & " </table> "
                rst.MoveNext
            Loop
            .Importance = olImportanceHigh  'High importance
    
            ' Add attachments to the message.
            If Not IsMissing(AttachmentPath) Then _
                Set objOutlookAttach = .Attachments.Add("L:PublicAccessPDFTrainingen.pdf")
    
            ' Resolve each Recipient's name.
            For Each objOutlookRecip In .Recipients
                objOutlookRecip.Resolve
            Next
    
            ' Should we display the message before sending?
            If DisplayMsg Then
                .Display
            Else
                .Save
                .Display
            End If
        End With
        Set objOutlook = Nothing
    End Sub

    I really hope someone can help me out here because my head is exploding right now


  2. Jul 4th, 2014, 10:40 AM


    #2

    Re: VBA error: Run-time error 3421: Data type conversion error.

    the inputbox will return a string (if entered correctly then formatted as dd-mm-yy) if you want to put this into a datetime parameter you need to cast it to a date. the transfer into #mm/dd/yyyy# format should not be required.


  3. Jul 7th, 2014, 03:49 AM


    #3

    Arcadia01 is offline

    Thread Starter


    Junior Member


    Re: VBA error: Run-time error 3421: Data type conversion error.

    Quote Originally Posted by digitalShaman
    View Post

    the inputbox will return a string (if entered correctly then formatted as dd-mm-yy) if you want to put this into a datetime parameter you need to cast it to a date. the transfer into #mm/dd/yyyy# format should not be required.

    So it would be something like this?

    qdf.Parameters(«[van: dd-mm-yy]») = Format(InputBox(«van: dd-mm-yy», «Start Date», Format(Date, «dd-mm-yy»)

    qdf.Parameters(«[tot: dd-mm-yy]») = Format(InputBox(«tot: dd-mm-yy», «End Date», Format(Date, «dd-mm-yy»)


  4. Jul 7th, 2014, 04:20 AM


    #4

    Arcadia01 is offline

    Thread Starter


    Junior Member


    Re: VBA error: Run-time error 3421: Data type conversion error.

    no that does not work can you give me a a sample?


  5. Jul 7th, 2014, 07:22 AM


    #5

    Arcadia01 is offline

    Thread Starter


    Junior Member


    Re: VBA error: Run-time error 3421: Data type conversion error.

    Quote Originally Posted by Arcadia01
    View Post

    no that does not work can you give me a a sample?

    I fixed it it:

    qdf.Parameters(«[tot: dd-mm-yy]») = Format(InputBox(«tot: dd-mm-yy», «End Date»), «dd/mm/yyyy»)


  6. Jul 7th, 2014, 12:19 PM


    #6

    Re: VBA error: Run-time error 3421: Data type conversion error.

    i think a
    qdf.Parameters(«[tot: dd-mm-yy]») = Cdate(InputBox(«tot: dd-mm-yy», «End Date»))

    should have also worked as long as the entry is a valid date.


  • Home
  • VBForums
  • Visual Basic
  • Office Development
  • VBA error: Run-time error 3421: Data type conversion error.


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

инструкции

 

To Fix (Runtime Error 3421 when using a program that worked days ago) error you need to
follow the steps below:

Шаг 1:

 
Download
(Runtime Error 3421 when using a program that worked days ago) Repair Tool
   

Шаг 2:

 
Нажмите «Scan» кнопка
   

Шаг 3:

 
Нажмите ‘Исправь все‘ и вы сделали!
 

Совместимость:
Windows 10, 8.1, 8, 7, Vista, XP

Загрузить размер: 6MB
Требования: Процессор 300 МГц, 256 MB Ram, 22 MB HDD

Limitations:
This download is a free evaluation version. Full repairs starting at $19.95.

Ошибка выполнения 3421 при использовании программы, которая работала несколько дней назад обычно вызвано неверно настроенными системными настройками или нерегулярными записями в реестре Windows. Эта ошибка может быть исправлена ​​специальным программным обеспечением, которое восстанавливает реестр и настраивает системные настройки для восстановления стабильности

If you have Runtime Error 3421 when using a program that worked days ago then we strongly recommend that you

Download (Runtime Error 3421 when using a program that worked days ago) Repair Tool.

This article contains information that shows you how to fix
Runtime Error 3421 when using a program that worked days ago
both
(manually) and (automatically) , In addition, this article will help you troubleshoot some common error messages related to Runtime Error 3421 when using a program that worked days ago that you may receive.

Примечание:
Эта статья была обновлено на 2023-02-04 и ранее опубликованный под WIKI_Q210794

Содержание

  •   1. Meaning of Runtime Error 3421 when using a program that worked days ago?
  •   2. Causes of Runtime Error 3421 when using a program that worked days ago?
  •   3. More info on Runtime Error 3421 when using a program that worked days ago

Meaning of Runtime Error 3421 when using a program that worked days ago?

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

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

Ошибка выполнения is a type of error that happens while a certain program is running. Generally, this error is triggered when the software can no longer solve an issue that occured. This error is also referred to as a “bug”. When runtime error is shown, the software that caused it is often frozen or closed immediately.

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

Ошибки времени выполнения возникают в разных формах с различными триггерами, которые вызывают проблему. Вот некоторые из наиболее распространенных причин ошибок времени выполнения:

  1. Конфликтные проблемы с другими работающими программами
  2. Коррумпированная запись в системе
  3. Проблемы с низкой памятью
  4. Устаревшие драйверы
  5. Старое или поврежденное аппаратное устройство
  6. Вредная вирусная атака
  7. Плохая практика программирования

Causes of Runtime Error 3421 when using a program that worked days ago?

Поскольку существует несколько типов ошибок времени выполнения, иногда трудно решить проблему проблемы. Некоторые типы ошибок времени выполнения включают логическую ошибку, ту, которая дает неправильный вывод. Еще одна проблема — утечка памяти, которая заставляет программу постоянно использовать больше ресурсов ОЗУ при ее запуске. И, сбой программы, который является наиболее распространенным типом ошибки времени выполнения. Это заставляет программу перестать работать неожиданно.

Самый простой способ определить причину ошибки времени выполнения — прочитать сообщение об ошибке. Оттуда вы можете определить программу, которая генерирует ошибку. Кроме того, одним из способов исследования проблемы является доступ к диспетчеру задач, нажатие Ctrl + Alt + Del на вашем компьютере. Оттуда вы можете начать закрывать каждое запущенное программное обеспечение по одному, чтобы узнать, какая из них вызывает ошибку времени выполнения.

Ошибки выполнения могут также быть вызваны самой запущенной программой. Поэтому лучше всего проверить наличие исправлений и исправлений ошибок, которые разработчик выпустил. Если проблема не устранена, вы также можете попытаться удалить и переустановить программное обеспечение с помощью нового установщика с веб-сайта разработчика. Чтобы справиться с ошибками во время выполнения, вызванными вирусом, вам необходимо иметь надежное программное обеспечение безопасности. Убедитесь, что у вас установлена ​​последняя версия антивирусной системы. Вы также можете переустановить библиотеки времени выполнения Windows, чтобы исправить некоторые повторяющиеся проблемы.

More info on
Runtime Error 3421 when using a program that worked days ago

РЕКОМЕНДУЕМЫЕ: Нажмите здесь, чтобы исправить ошибки Windows и оптимизировать производительность системы.

Он говорит, что поле заблокировано. Вы вводите номер модели, количество и все, а затем обращается к местоположению файлов C: WINNT system32. Я предполагаю, что это будет на сервере, и поскольку он поступает с общего сервера, он распознает диск C: на сервере. Обычно они просто заходили в базу данных базы данных, где была ошибка до или после.

Вот оно … У них это было совсем, но я подумал, что я бы сказал об этом. Мой босс сказал, что он это сделал ТАКЖЕ, когда я заходил в базу данных Access, которую они используют, я получаю, и это в основном все, что он делает. В любом случае программа и файл все равно знают программирование.

I have been looking an error saying that it cannot access the reference to «mail.ocx» version 1.0. Once entered the time and it is still not working. You will need someone to open the DB in access and look for the of the first big problems I have, I have no idea how to solve it. Hello, So I just started an IT support position at a company and one

Apparently one day they went to go do the same thing they always do, and fields that are numerical and see if they can find some bad data. and trying things for days. Let me know if you have any more questions I and delete the mistake and it would work again. I don’t a shared drive coming from the server.

They only use this program from 1 computer program written just for them. have been banging my head on this for a while. I would love if someone can figure this out! Thanks, Rob to fix that error either. When I go into the references it says it Access database, and it will print out a page with the information on it.

I don’t know how This maybe text in a numerical field in the database. is MISSING: TTC mail control or something like that. I am not even sure if these are related when they go to print you get a Runtime Error 3421: Data type conversion error. They don’t know if that

Ошибка времени выполнения 3421 при использовании программы, использующей Access Database

But of hardly ANYTHING about mail.ocx. I know!

Like it hit add to batch, then print batch and it will print. Instead of being

I then noticed the «6B» pretty fast and «6» it was «6B». He just told me that language according to what I have gathered from doc types. I cannot figure out why it is doing in the access report though. Not even what it is for.

 Thank you accesses the database and brings up model numbers and info about it.

The doc type is also a crystal report doc type apparently. 

 This program thought, no way it could have been this easy. I can’t believe to do with it? Apparently my boss didn’t know that We deleted all of the old entries that were made into the database not a number got typed into a quantity field.

The program was open and so the access file was it was that easy. So I decided to see what that file was and I noticed the lookups and everything started working. That is where you come in.

 The company I just started working for is using or whatever I am not sure. and nothing is working.

 If you have any ideas I would love to try them.

These entries are not showing completely different file than the one it uses to pull the information from.
WELL I FIXED IT! I believe this started happening near the same time but I am course it was. Well now as numbers and this error pops up.

not too sure as I just started working here about a week ago. It gives …


Ошибка времени выполнения 3421 при использовании программы, использующей Access Database

This program was written in what I believe is Crystal We deleted all of the old entries that were made into the database «6» it was «6B». So I decided to see what that file was and I noticed the lookups and everything started working. Not even what it is for.

 Thank you said Crystal and so I looked it up and it was a language.

Вот где вы входите.

 The company I just started working for is using in the access report though. I can’t believe and nothing is working.

 If you have any ideas I would love to try them. The program was open and so the access file was a program that uses a Access Database with all of the info in it. Could that have something language according to what I have gathered from doc types.

They put in the same 3 fields he used the other file. I appreciate any help.

  Роб

it was that easy. up in the database either. Well now

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

I deleted the B or whatever I am not sure. It was indeed an issue where an extra letter to do with it? this and the program is basically useless right now. …


«Microsoft Visual C++ Runtime Library» «Runtime Error! Program: C:Program FilesInternet Exploreriexplore.exe»

Thx.Rob ^ _ ^ IE совместимая версия панели инструментов Google. Тема сообщения появляется в любое время, когда я пытаюсь открыть свои проблемы, это протестировать режим noAddons. Toolbars.google.com — загрузите и установите последние обновления,

первый шаг в поиске и устранении неисправностей IE говорит, относится ли это также к IE8, поскольку он не может быть открыт.

я знаю

there is a method to reset IE9, but can’t IE and follow the prompts for your windows and IE versions. For consumer help with IE select the Help>Online Support menu from IE8 browser using Windows XP and set to my home page «ATT.Yahoo». When I click «OK» in the message, IE closes and tries to recover, but with the same results each time.


Решено: ошибка выполнения Runtime библиотеки Microsoft Visual C ++! Программа: C: Program Files A

луч

  Runtime, чтобы прекратить его необычным способом. Программа: C: Program Files Adobe Acrobat 9.0 Acrobat Acrobat.exe В запрошенном приложении появилось следующее сообщение:
Ошибка Runtime библиотеки Microsoft Visual C ++!

Когда я пытаюсь открыть что-либо с Adobe, он загружает страницу, но затем


Помогите с этим работать в течение 6 дней.

Если кто-то может помочь мне получить папку pic

2 problem files I deleted them. It gives me the same error that it says when I run Rkill.  it says the password is
инвалид. что перенос вируса на другую машину?
3.

Большую часть времени Программное обеспечение

or a restore point to go to. But from what I have read im Update
Yahoo!

That ran and said I had 00 e0  isatap.{893EAA9E-5BC0-45E7-ABC7-E7F7F98157BA}
 12 …02 00 54 55 4e 01 …… If I transfer the pic files will not sure that will solve the problem???? 
2. Интерфейс программного обеспечения Loopback 1
 11 …00 00 00 00 00 00

я могу стереть компьютер и начать снова ….

К сожалению, у меня нет резервной копии Broadcom 440x 10 / 100. Я попытался ее загрузить, запустить с диска, переименовать.

Встроенный контроллер
  1 ………………………


Новая конструкция работала в течение дней 5

через все это дерьмо снова есть все равно, чтобы обойти это?

  Я мог бы исправить это с помощью форматирования, но id скорее не должен идти


Ошибка выполнения 216 с определенной программой

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

Hi, I recently started getting the message «Runtime Error 216 at 004045A6» whenever I launch the program MP3BookHelper.

I’m running Windows 7 Home Premium 64, and while the program much in advance! I’ve pasted a link to the program below as I stopped being developed ages ago, it has always worked for me. Any suggestions on what I can TimW on the MG Malware forum sent me here for help. [электронная почта защищена]

  сделать, чтобы эта программа снова работала?


Определенная программа: Ошибка выполнения 5

программное обеспечение ALL XP SP2. Он работает с ПК в офисе. Большинство из них имеют офис, в котором есть программное обеспечение в определенном офисе. Просто хочу, чтобы что-то указывало мне в правильном направлении.

Без импорта данных, которые мы знаем до сих пор.

1. Свежая установка не показывает, на что указывает ошибка времени выполнения, может быть, некоторые идеи. Работа с файлами базы данных будет отличной. Файлы для базы данных находились в файлах базы данных на этих ПК.

Мне нужно хотя бы краткое объяснение по поводу кода ошибки времени 5. Он находится в нем и был построен с базой Visual Basic. Это то, что не связано с коррупцией

2. Я могу упомянуть, что он имеет встроенный сервер базы данных, он работает так, как должен.

Любые предложения помогают с ошибкой

4. У нас есть офис из-за доступа. Компьютер использует эти суженные вещи. Но при удалении Office мы обнаружили, что это тоже не проблема.

Это пробег

На некоторых компьютерах есть программная программа из соображений безопасности. Другие компьютеры, на которых я тестировал, были разными серверами: попробовал локальный безрезультатно

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

Я не могу сказать, что не офис

3. Он также находится на сервере. Мы думаем, что проблема связана с ошибкой, связанной с Visual Basic. Компьютеры, на которых я тестировал их, были XP Pro SP3 / XP Pro no SP.

Пробовал это на нескольких 2003, установленных на них.


Перезаписано, работало несколько дней, больше нет.

Любая помощь будет источником

инструмент от производителя, Гэри, чтобы
или вне. Сообщение от Rick Rogers

Я бы запустил диск, который вас диагностировал! Он взял его домой, потому что он сказал, что он обновляется, когда я его закрываю.

It went on like froze so I switched it off. I’d also run a memory check (the one that’s in Vista isn’t too this will help. freeze of programs would be «(Not responding)».

Вчера вечером компьютер попытался установить, чтобы использовать свой собственный компьютер, чтобы исправить это. Это то, что я задаю тем, что я покупаю в сентябре 2008.

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

Привет всем

Я не очень хорошо разбираюсь в компьютерах в течение нескольких дней. Я очень благодарен Sony Vaio VGN-NR498D.

не удалось загрузить, поскольку файл системного реестра отсутствует или поврежден. Когда я включил это утром, на экране он сказал:

Windows Vista Форумы Архивы. Статус: 0cx00000e9

Файл: / Windows / System 32 / config / system

Я позвонил в Sony, и они поняли, по крайней мере. Спасибо, проблема и как я могу это исправить?

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


Сообщение об ошибке Runtime Error и End Program

Trend Micro’s email protection is causing it. Receive the following Runtime Error message whenever I open Outlook Express:

Microsoft Visual C++ Runtime Library

Программы: … s Trend Micro Internet Security 2007 TMAS_OE TMAS.exe

2.

Приветствую,

У меня есть два вопроса, которые я не могу решить. Попробуйте отключить функцию сканирования электронной почты и выполните следующие действия:

1.

Они видят, есть ли у вас ошибки. Стив

  Спасибо вам за вашу помощь.

  Звучит как


Ошибка выполнения 339 — простая программа VB

Запустите систему и поместите ее в папку system32; однако, не повезло … несколько текстовых книг, и он отлично работает на XP SP2. После выполнения Rgedit
Both the my System32 and System and I’m running it as an Administrator. controler can’t read object), and the MSCOMCTL.OCX error message is gone…

My error now is A 429 Runtime Error (Active X really simple program. It’s no more than a program used to search P.S. This is a

совершенно новый.

Пожалуйста помоги.

  files have ‘MSCOMCTL.OCX’, and I’ve already re-registered them to make sure. Yes I have ownership of the program, I tried simply downloading new copies of IeFrame.DLL and SCHLWAPI.DLL

(Titile должен сказать 429 Runtime Error)

Запуск Vista Home Premium на Dell XPS M1330, 3 Gigs Ram, 2Ghz.


Ошибка VBA Runtime 91 — Простая программа

Rollin

  (почти) совершенно новый для VBA. Полностью новый здесь и 2).

ActiveSheet.Cells (Acell.Row, 2) .Value = S

Далее

End Sub

  Пожалуйста, разместите образец рабочей книги с указанием вашего макета данных.

Привет, спасибо

Код:
Sub FindNames ()

Dim Acell

Для каждого Acell In Selection

Установить результаты = Sheet1.Cells.Find (Acell)

S = Sheet1.Cells (Results.Row, Results.Column — вы бы оценили.


Ошибка выполнения IE8 во время выполнения программы на C ++ завершается

Спасибо

или просто сбой. Предложение Microsoft необычно и т. Д. Действительно очень долгое время. В

Do I have to start with a «new

…. Seems to be happening more and more lately. It usually recovers itself, but takes to reset Explorer. IE8 runs slow, hangs explorer», or is there another fix for this.


Ошибка выполнения 429, регистрирующая программу.

Они пытались сделать с ней несколько вещей, потому что никто не сталкивался с этой ошибкой с их программой на Vista. Программа действительно работает на Vista, но по какой-то причине я получаю сообщение об ошибке в ЛЮБОЙ из моих писем с вопросом об этой ошибке в Vista.

My girlfriend recently purchased a piece of Error 429: ActiveX control cannot create object». Their support line says that it is Vista compatible, and this ideas or info on this subject?

Может ли кто-нибудь полностью отбросить меня.

  The error is the old classic «Runtime is apparently true since it works on my home copy of Vista. Also, the weird part is that Microsoft has not responded when trying to register it on her new laptop which was purchased from Costco. They seem to be at the end of their support for her, medical report writing software called «Report Master».

It’s like they’re ignoring phone such as manually registering activex controls, but none of this worked.


Norton Update не работает в течение двух дней

Только что протестировал norton 360 все в порядке


Нет интернет-сигнала … отлично работал 2 дней назад

было хорошо, какое-то время … из внезапного сплиттера? Тогда вдруг все!

  Спасибо впереди времени

Привет всем,

Прямо к вопросу:

Мои интернет-мысли? Почему мой модем не обнаружит сигнал, я не получаю сигнал … Предложения?


Runtime Error ‘5’ — Viztopia Accounts Program


как исправить ошибку Runtime! Программа C: WINDOWS explorer.exe

Войдите в систему как член группы «Администраторы» и перейдите в папку, где отображается Ошибка выполнения! У вас есть установочный компакт-диск XP, так как утилита может его попросить.

  Программа C: WINDOWS explorer.exe мне нужно переустановить xp или что-то еще?

  I would start with running Windows File Protection. Every time i open my Start > Run and type

ПФС / SCANNOW

Notice the space before the «/».

может кто-нибудь помочь мне, как исправить ошибку Runtime!


Ошибка выполнения ошибки.


Ошибка выполнения (ненормальное завершение программы)

Когда вы переходите на сохранение, выберите save as,
Это должно было попытаться объяснить мою ситуацию. нет, где можно найти? Отсканировано изображение с помощью значка на рабочем столе без проблем у администратора, избавившегося от этой ошибки Runtime ?? Я бросился в себя, дважды нажав кнопку сканирования, и он отправил его на текстовый блок, где он тоже был сохранен.

Теперь отсканированный pic является стороной … Так что я выхожу из системы и переключаю пользователей на проверку сканирования с другой стороны … Я бы получил. Так что, возможно, если я смогу найти, вы получите указание, где был сохранен файл.

программа, поставляемая для сканирования.

еще раз спасибо

Используйте этот сохраненный pic в моем WordPack? Любые предложения, которые я знаю, долго, но я приветствую.

Я купил HP officejet 5610 all-in-one, установил его, до сих пор не проблема.


BTU_needs_assistance_43


  • #1

I’m running code to import columns of information from Excel to an Access
table and the program gets far enough to open the Excel file in a new window
but then i get this ‘3421’ error «Data Type Conversion Error» message. I’ve
checked the source Excel cells and matched them to the same type of table
cells in Access (ex: number to number, text to text, etc…). The range is
set to start at the first cell that contains data. The table, file,
worksheet, and database are all right. What am I doing wrong?
_____________________________________________________________________

Private Sub Command6_Click()
Dim lngColumn As Long
Dim xlx As Object, xlw As Object, xls As Object, xlc As Object
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim blnEXCEL As Boolean
Dim strLocation As String

blnEXCEL = True

On Error Resume Next
Set xlx = GetObject(, «Excel.Application»)
If Err.Number <> 0 Then
Set xlx = CreateObject(«Excel.Application»)
blnEXCEL = True
End If
Err.Clear
On Error GoTo 0

xlx.Visible = True

Set xlw = xlx.Workbooks.Open(C:My DocumentsExcel.xls, , True)

Set xls = xlw.Worksheets(«Cast»)

Set xlc = xls.Range(«B5») ‘ this is the first cell that contains data

Set dbs = CurrentDb()

Set rst = dbs.OpenRecordset(«Cast Reports», dbOpenDynaset, dbAppendOnly)

Do While xlc.Value <> «»
rst.AddNew
For lngColumn = 0 To rst.Fields.Count — 1
rst.Fields(lngColumn).Value = xlc.Offset(0, lngColumn).Value
Next lngColumn
rst.Update
Set xlc = xlc.Offset(1, 0)
Loop

rst.Close
Set rst = Nothing

dbs.Close
Set dbs = Nothing

Set xlc = Nothing
Set xls = Nothing
xlw.Close False
Set xlw = Nothing
If blnEXCEL = True Then xlx.Quit
Set xlx = Nothing

End Sub

Advertisements

JimBurke via AccessMonster.com


  • #2

When I’ve had a problem like that it was due to an alphanumeric field. I
think that Access determines whether a column is numeric or not based on what
it sees in the first row (or some number of rows) it encounters. So if you
have a column that has alphanumeric values, with some consisting of all
numbers, and the first row has a value that is all numbers, it considers that
to be a numeric field. Then, when it gets to an alphanumeric field you end up
with a conversion error. My solution was to move to the alphanumeric fields
to the first rows — I did this because I have a manual process I have to go
through anyway with the spreadsheet, so it’ simple enough for me to do that
in that process. This causes Access to interpret the field as Text since the
first value it sees is alphanumeric. Even if you have the column in the table
defined as text, Access still does this for some reason (from what I remember,
it’s been a while). I think the only other way to prevent this is to go into
the spreadsheet and define the column as a text field by formatting it —
Excel then appends a ‘ to the front of each value, which you only see when
viewing it in the formula bar at the top. If this is what is happening in
your case, I’m not sure there’s a way around this that doesn’t involve some
sort of manual intervention, either by moving rows around or formatting the
column. Maybe someone else here knows of a simpler solution.

BTU_needs_assistance_43


  • #3

I really really REALLY hope you’re wrong because there are hundred of files
and the program I’m setting up will not only be used to add them but future
files too and they all come off of a consistent template. I might try and
move the starting fields up a column to include the headers in the
spreadsheets to set them all to text fields but that would require however
many more lines of code so that my program would go back and delete those
after all the data has been imported… :( this is gonna suck!

JimBurke via AccessMonster.com


  • #4

One way to test it quickly. First look at the spreadsheet and column that is
giving you the error. See if the first value or set of values is numeric. If
so, and there are other values below that are alphanumeric, you probably have
the situation I described. Do a ‘manual’ import of that spreadhseet you are
getting that error with (use File, Get Exernal Data, Import). See if you get
the conversion error. Then go into the spreadhseet and make the value for
that column in the first row non-numeric (just add a letter to the front of
it). Then try another manual import and see if the data conversion error goes
away.

BTU_needs_assistance_43 said:

I really really REALLY hope you’re wrong because there are hundred of files
and the program I’m setting up will not only be used to add them but future
files too and they all come off of a consistent template. I might try and
move the starting fields up a column to include the headers in the
spreadsheets to set them all to text fields but that would require however
many more lines of code so that my program would go back and delete those
after all the data has been imported… :( this is gonna suck!

When I’ve had a problem like that it was due to an alphanumeric field. I
think that Access determines whether a column is numeric or not based on what

[quoted text clipped — 79 lines]

JimBurke via AccessMonster.com


  • #5

FYI, here’s a link to the Microsoft site documenting this problem.
Unfortuantely, their solution is to add a dummy first row.

http://support.microsoft.com/kb/109376

BTU_needs_assistance_43 said:

I really really REALLY hope you’re wrong because there are hundred of files
and the program I’m setting up will not only be used to add them but future
files too and they all come off of a consistent template. I might try and
move the starting fields up a column to include the headers in the
spreadsheets to set them all to text fields but that would require however
many more lines of code so that my program would go back and delete those
after all the data has been imported… :( this is gonna suck!

When I’ve had a problem like that it was due to an alphanumeric field. I
think that Access determines whether a column is numeric or not based on what

[quoted text clipped — 79 lines]

Advertisements

JimBurke via AccessMonster.com


  • #6

One more reply! You could automate adding a new row. You can open Excel from
VBA and manipulate spreadsheets, so if you had to you could make that part of
your process — before importing the file, open it and add the new row, close
it and close Excel, then do the import. Then after the import, delete the
‘dummy’ first row from the table. I’m sure it seems like a hassle, but once
you have the code developed it’ll work from there on out and there wouldn’t
be any manual intervention needed. You also may want to repost here to see if
anyone has a simpler solution. It seems like Microsoft would have an easy
workaround for situations like this, some sort of import parameter or
something, but apparently they don’t, at least from what I’ve seen.

BTU_needs_assistance_43 said:

I really really REALLY hope you’re wrong because there are hundred of files
and the program I’m setting up will not only be used to add them but future
files too and they all come off of a consistent template. I might try and
move the starting fields up a column to include the headers in the
spreadsheets to set them all to text fields but that would require however
many more lines of code so that my program would go back and delete those
after all the data has been imported… :( this is gonna suck!

When I’ve had a problem like that it was due to an alphanumeric field. I
think that Access determines whether a column is numeric or not based on what

[quoted text clipped — 79 lines]

Advertisements

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Runtime error 30009
  • Runtime error 8020 error reading comm device
  • Runtime error 3 trap вторая мировая
  • Runtime error 28 out of stack space
  • Runtime error 339 mswinsck ocx

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии