Номер ошибки 7874 access

Icon Ex Номер ошибки: Ошибка 7874
Название ошибки: Access Error 7874
Описание ошибки: Ошибка 7874: Возникла ошибка в приложении Microsoft Access. Приложение будет закрыто. Приносим извинения за неудобства.
Разработчик: Microsoft Corporation
Программное обеспечение: Microsoft Access
Относится к: Windows XP, Vista, 7, 8, 10, 11

Анализ «Access Error 7874»

«Access Error 7874» — это стандартная ошибка времени выполнения. Когда дело доходит до Microsoft Access, инженеры программного обеспечения используют арсенал инструментов, чтобы попытаться сорвать эти ошибки как можно лучше. Хотя эти превентивные действия принимаются, иногда ошибки, такие как ошибка 7874, будут пропущены.

Ошибка 7874, рассматриваемая как «Access Error 7874», может возникнуть пользователями Microsoft Access в результате нормального использования программы. Если происходит «Access Error 7874», разработчикам будет сообщено об этой проблеме, хотя отчеты об ошибках встроены в приложение. Затем программисты могут исправить эти ошибки в коде и включить исправление, которое можно загрузить с их веб-сайта. Чтобы исправить такие ошибки 7874 ошибки, устанавливаемое обновление программного обеспечения будет выпущено от поставщика программного обеспечения.

Когда происходит ошибка 7874?

Сбой во время запуска Microsoft Access или во время выполнения, как правило, когда вы столкнетесь с «Access Error 7874». Мы можем определить происхождение ошибок ошибки 7874 во время выполнения следующим образом:

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

Утечка памяти «Access Error 7874» — при утечке памяти Microsoft Access это может привести к медленной работе устройства из-за нехватки системных ресурсов. Есть некоторые потенциальные проблемы, которые могут быть причиной получения проблем во время выполнения, с неправильным кодированием, приводящим к бесконечным циклам.

Ошибка 7874 Logic Error — логическая ошибка Microsoft Access возникает, когда она производит неправильный вывод, несмотря на то, что пользователь предоставляет правильный ввод. Это видно, когда исходный код Microsoft Corporation содержит недостаток в обработке данных.

Как правило, ошибки Access Error 7874 вызваны повреждением или отсутствием файла связанного Microsoft Access, а иногда — заражением вредоносным ПО. Большую часть проблем, связанных с данными файлами, можно решить посредством скачивания и установки последней версии файла Microsoft Corporation. Помимо прочего, в качестве общей меры по профилактике и очистке мы рекомендуем использовать очиститель реестра для очистки любых недопустимых записей файлов, расширений файлов Microsoft Corporation или разделов реестра, что позволит предотвратить появление связанных с ними сообщений об ошибках.

Распространенные сообщения об ошибках в Access Error 7874

Общие проблемы Access Error 7874, возникающие с Microsoft Access:

  • «Ошибка программы Access Error 7874. «
  • «Ошибка программного обеспечения Win32: Access Error 7874»
  • «Возникла ошибка в приложении Access Error 7874. Приложение будет закрыто. Приносим извинения за неудобства.»
  • «Access Error 7874 не может быть найден. «
  • «Access Error 7874 не может быть найден. «
  • «Ошибка запуска в приложении: Access Error 7874. «
  • «Файл Access Error 7874 не запущен.»
  • «Access Error 7874 остановлен. «
  • «Неверный путь к приложению: Access Error 7874.»

Эти сообщения об ошибках Microsoft Corporation могут появляться во время установки программы, в то время как программа, связанная с Access Error 7874 (например, Microsoft Access) работает, во время запуска или завершения работы Windows, или даже во время установки операционной системы Windows. При появлении ошибки Access Error 7874 запишите вхождения для устранения неполадок Microsoft Access и чтобы HelpMicrosoft Corporation найти причину.

Создатели Access Error 7874 Трудности

Проблемы Microsoft Access и Access Error 7874 возникают из отсутствующих или поврежденных файлов, недействительных записей реестра Windows и вредоносных инфекций.

Более конкретно, данные ошибки Access Error 7874 могут быть вызваны следующими причинами:

  • Недопустимая или поврежденная запись Access Error 7874.
  • Файл Access Error 7874 поврежден от вирусной инфекции.
  • Другая программа злонамеренно или по ошибке удалила файлы, связанные с Access Error 7874.
  • Другое приложение, конфликтующее с Access Error 7874 или другими общими ссылками.
  • Неполный или поврежденный Microsoft Access (Access Error 7874) из загрузки или установки.

Продукт Solvusoft

Загрузка
WinThruster 2023 — Проверьте свой компьютер на наличие ошибок.

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

Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

What is Error 7874?

Error 7874 is a kind of Runtime error that is found in the Microsoft Windows operating systems. The file can be found for Microsoft Access. Access Error 7874 has a popularity rating of 1 / 10.

Errors

This tutorial contains information on Error 7874 or otherwise known as Access Error 7874. Errors such as Access Error 7874 indicate your machine has faulty hardware or software that should be fixed when possible. Below is information on how to repair Error 7874 and get your computer back to normal.

Megaphone Signs of Error 7874:

  • When your computer freezes or locks up at random.
  • When your computer crashes when you are running Microsoft Access.
  • If Access Error 7874 pops up and causes a program to shutdown or your computer to crash.
  • Your computer is running slow, taking a long time to boot up, and you suspect Error 7874 by Microsoft Access is the cause.

What Causes Runtime Errors Like Error 7874?

There are several causes of runtime errors like Access Error 7874, such as viruses, out of date drivers, missing files or folders, incomplete or poor installation, and registry errors. They can also occur due to an issue with the computer’s memory, which may often be due to a hardware problem. In some cases there was an issue installing Microsoft Access and an error occurred.

Fix How to Fix Access Error 7874

Follow the step by step instructions below to fix the Error 7874 problem. We recommend you do each in order. If you wish to skip these steps because they are too time consuming or you are not a computer expert, see our easier solution below.

Step 1 — Uninstall and Reinstall Microsoft Access

If the Access Error 7874 is a result of using Microsoft Access, you may want to try reinstalling it and see if the problem is fixed. Please follow these steps:

Windows XP

  1. Click “Start Menu”.
  2. Click “Control Panel”.
  3. Select the “Add or Remove” program icon.
  4. Find the Error 7874 associated program.
  5. Click the Change/Remove button on the right side.
  6. The uninstaller pop up will give you instructions. Click “okay” or “next”  or “yes” until it is complete.
  7. Reinstall the software.

Windows 7 and Windows Vista

  1. Click “Start Menu”.
  2. Click “Control Panel”.
  3. Click “Uninstall a Program” which is under the “Programs” header.
  4. Find the Error 7874 associated program.
  5. Right click on it and select “Uninstall”.
  6. The uninstaller pop up will give you instructions. Click “okay” or “next”  or “yes” until it is complete.
  7. Reinstall the software and run the program.

Windows 8, 8.1, and 10

  1. Click “Start Menu”.
  2. Click “Programs and Features”.
  3. Find the software that is linked to **insert file name**.
  4. Click Uninstall/Change.
  5. The uninstaller will pop up and give you instructions. Click “okay” and “next” until it is complete.
  6. Restart your computer.
  7. Reinstall the software and run the program.

Step 2 — Remove Registry Entry related to Error 7874

Warning WARNING: Do NOT edit the Windows Registry unless you absolutely know what you are doing. You may end up causing more trouble than you start with. Proceed at your OWN RISK.

  1. Create a backup of registry files.
  2. Click “Start”.
  3. Type regedit, select it, and grant permission in order to proceed.
  4. Click HKEY LOCAL MACHINE>>SOFTWARE>>Microsoft>>Windows>>Current Version>>Uninstall.
  5. Find the Access Error 7874 software from the list you wish to uninstall.
  6. Select the software and double click the UninstallString icon on the right side.
  7. Copy the highlighted text.
  8. Exit and go to the search field.
  9. Paste the data.
  10. Select Okay in order to uninstall the program.
  11. Reinstall the software.

Step 3 – Ensure Junk Isn’t Causing Access Error 7874

Any space that isn’t regularly cleaned out tends to accumulate junk. Your personal computer is no exception. Constant web browsing, installation of applications, and even browser thumbnail caches slow down your device and in the absence of adequate memory, can also trigger a Access Error 7874 error.

So how do you get around this problem?

  • You can either use the Disk Cleanup Tool that comes baked into your Windows operating system.
  • Or you can use a more specialized hard drive clean up solution that does a thorough job and flushes the most stubborn temporary files from your system.

Both solutions may take several minutes to complete the processing of your system data if you haven’t conducted a clean up in a while.
The browser caches are almost a lost cause because they tend to fill up quite rapidly, thanks to our constantly connected and on the go lifestyle.
Here’s how you can run the Window’s Disk Cleanup Tool, without performance issues or surprises.

  • For Windows XP and Windows 7, the program can be ran from “Start” and from the “Command Prompt”.
    • Click “Start”, go to All Programs > Accessories > System Tools, click Disk Cleanup. Next choose the type of files you wish to remove, click OK, followed by “Delete Files”.
    • Open up the Command Prompt, type “c:\windows\cleanmgr.exe /d” for XP and “cleanmgr” for Windows 7. Finish by pressing “Enter”.
  • For Windows 8 and Windows 8.1, the Disk Cleanup Tool can be accessed directly from “Settings”. Click “Control Panel” and then “Administrative Tools”. You can select the drive that you want to run the clean up on. Select the files you want to get rid of and then click “OK” and “Delete Files”.
  • For Windows 10, the process is simplified further. Type Disk Cleanup directly in the search bar and press “Enter”. Choose the drive and then the files that you wish to wipe. Click “OK”, followed by “Delete Files”.

The progressive ease with which the Cleanup Tool can be used points to the growing importance of regularly deleting temporary files and its place in preventing Access Error 7874.

Warning PRO TIP:
Remember to run the Disk Cleanup as an administrator.


Step 4 – Fix Infections and Eliminate Malware in Your PC

How do you gauge if your system is infected with a malware and virus?

Well, for one, you may find certain applications misbehaving.

And you may also see the occurrence of Error 7874.

Infections and malware are the result of:

  • Browsing the Internet using open or unencrypted public Wi-Fi connections
  • Downloading applications from unknown and untrustworthy sources
  • Intentional planting of viruses in your home and office networks

But thankfully, their impact can be contained.

  • Enter “safe mode” by pressing the F8 key repeatedly when your device is restarting. Choose “Safe Mode with Networking” from the Advanced Boot Options menu.
  • Back up all the data in your device to a secure location. This is preferably a storage unit that is not connected to your existing network.
  • Leave program files as is. They are where the infection generally spreads from and may have been compromised.
  • Run a thorough full-system scan or check of an on-demand scanner. If you already have an antivirus or anti-malware program installed, let it do the heavy lifting.
  • Restart your computer once the process has run its course.
  • Lastly, change all your passwords and update your drivers and operating system.

Warning PRO TIP: Are you annoyed by the frequent updates to your antivirus program? Don’t be! These regular updates add new virus signatures to your software database for exponentially better protection.


Step 5 – Return to the Past to Eliminate Error 7874

The steps outlined up until this point in the tutorial should have fixed Access Error 7874 error. But the process of tracking what has caused an error is a series of educated guesses. So in case the situation persists, move to Step 5.

Windows devices give users the ability to travel back in time and restore system settings to an uncorrupted, error free state.
This can be done through the convenient “System Restore” program. The best part of the process is the fact that using System Restore doesn’t affect your personal data. There is no need to take backups of new songs and pictures in your hard drive.

  • Open “Control Panel” and click on “System & Security”.
  • Choose the option “System”.
  • To the left of the modal, click on “System Protection”.
  • The System Properties window should pop-up. You’ll be able to see the option “System Restore”. Click on it.
  • Go with “Recommended restore” for the path of least hassles and surprises.
  • Choose a system restore point (by date) that will guarantee taking your device back to the time when Error 7874 hasn’t been triggered yet.
  • Tap “Next” and wrap up by clicking “Finish”.

If you’re using Windows 7 OS, you can reach “System Restore” by following the path Start > All Programs > Accessories > System Tools.


Step 6 — Error 7874 Caused by Outdated Drivers

Updating a driver is not as common as updating your operating system or an application used to run front-end interface tasks.

Drivers are software snippets in charge of the different hardware units that keep your device functional.

So when you detect an Access Error 7874 error, updating your drivers may be a good bet. But it is time consuming and shouldn’t be viewed as a quick fix.

Here’s the step-by-step process you can go through to update drivers for Windows 8, Windows 8.1 and Windows 10.

  • Check the site of your hardware maker for the latest versions of all the drivers you need. Download and extract them. We strongly advice going with original drivers. In most cases, they are available for free on the vendor website. Installing an incompatible driver causes more problems than it can ever fix.
  • Open “Device Manager” from the Control Panel.
  • Go through the various hardware component groupings and choose the ones you would like to update.
  • On Windows 10 and Windows 8, right-click on the icon of the hardware you would like to update and click “Update Driver”.
  • On Windows 7 and Vista, you right-click the hardware icon, choose “Properties”, navigate to the Driver panel, and then click “Update Driver”.
  • Next you can let your device automatically search for the most compatible drivers, or you can choose to update the drivers from the versions you have on your hard drive. If you have an installer disk, then the latter should be your preferred course of action. The former may often get the driver selection incorrect.
  • You may need to navigate a host of warnings from the Windows OS as you finalize the driver update. These include “Windows can’t verify that the driver is compatible” and “Windows can’t verify the publisher of this driver”. If you know that you have the right one in line, click “Yes”.
  • Restart the system and hopefully the Access Error 7874 error should have been fixed.

Step 7 – Call the Windows System File Checker into Action

By now the Access Error 7874 plaguing your device should have been fixed. But if you haven’t resolved the issue yet, you can explore the Windows File Checker option.

With the Windows File Checker, you can audit all the system files your device needs to operate, locate missing ones, and restore them.
Sound familiar? It is almost like “System Restore”, but not quite. The System Restore essentially takes you back in time to a supposedly perfect set up of system files. The File Checker is more exhaustive.

It identifies what is amiss and fills the gaps.

  • First and foremost, open up an elevated command prompt.
  • Next, if you are using Windows 8, 8.1 or 10, enter “DISM.exe /Online /Cleanup-image /Restorehealth” into the window and press Enter.
  • The process of running the Deployment Image Servicing and Management (DISM) tool may take several minutes.
  • Once it completes, type the following command into the prompt “sfc /scannow”.
  • Your device will now go through all protected files and if it detects an anomaly, it will replace the compromised version with a cached version that resides at %WinDir%\System32\dllcache.

Step 8 – Is your RAM Corrupted? Find Out.

Is it possible? Can the memory sticks of your device trigger Error 7874?

It is unlikely – because the RAM chips have no moving parts and consume little power. But at this stage, if all else has failed, diagnosing your RAM may be a good move.

You can use the Windows Memory Diagnostics Tool to get the job done. Users who are on a Linux or Mac and are experiencing crashes can use memtest86.

  • Open up your device and go straight to the “Control Panel”.
  • Click on “Administrative Tools”.
  • Choose “Windows Memory Diagnostic”.
  • What this built-in option does is it burns an ISO image of your RAM and boots the computer from this image.
  • The process takes a while to complete. Once it is done, the “Status” field at the bottom of the screen populates with the result of the diagnosis. If there are no issues with your RAM/memory, you’ll see “No problems have been detected”.

One drawback of the Windows Memory Diagnostic tool pertains to the number of passes it runs and the RAM segments it checks.

Memtest86 methodically goes over all the segments of your memory – irrespective of whether it is occupied or not.

But the Windows alternative only checks the occupied memory segments and may be ineffective in gauging the cause of the Access Error 7874 error.


Step 9 – Is your Hard Drive Corrupted? Find Out.

Your RAM or working memory isn’t the only culprit that may precipitate an Access Error 7874 error. The hard drive of your device also warrants close inspection.

The symptoms of hard drive error and corruption span:

  • Frequent crashes and the Blue Screen of Death (BSoD).
  • Performance issues like excessively slow responses.
  • Errors like Error 7874.

Hard drives are definitely robust, but they don’t last forever.

There are three things that you can do to diagnose the health of your permanent memory.

  • It is possible that your device may have a hard time reading your drive. This can be the cause of an Access Error 7874 error. You should eliminate this possibility by connecting your drive to another device and checking for the recurrence of the issue. If nothing happens, your drive health is okay.
  • Collect S.M.A.R.T data by using the WMIC (Windows Management Instrumentation Command-line) in the command prompt. To do this, simply type “wmic” into the command prompt and press Enter. Next follow it up with “diskdrive get status”. The S.M.A.R.T status reading is a reliable indicator of the longevity of your drive.
  • Fix what’s corrupt. Let’s assume you do find that all isn’t well with your hard drive. Before you invest in an expensive replacement, using Check Disk or chkdsk is worth a shot.
    • Open the command prompt. Make sure you are in Admin mode.
    • Type “chkdsk C: /F /X /R” and press “Enter”. “C” here is the drive letter and “R” recovers data, if possible, from the bad sectors.
    • Allow the system to restart if the prompt shows up.
    • And you should be done.

These steps can lead to the resolution you’re seeking. Otherwise the Access Error 7874 may appear again. If it does, move to Step 10.


Step 10 – Update Windows OS

Like the software applications you use to render specific tasks on your device, the Operating System also requires periodic updates.
Yes, we’ve all heard the troubling stories.

Devices often develop problems post unfinished updates that do not go through. But these OS updates include important security patches. Not having them applied to your system leaves it vulnerable to viruses and malware.

And may also trigger Error 7874.

So here’s how Windows 7, Windows 8, Windows 8.1 and Windows 10 users can check for the latest updates and push them through:

  • Click the “Start” button on the lower left-hand corner of your device.
  • Type “Updates” in the search bar. There should be a “Windows Update” or “Check for Updates” option, based on the OS version you’re using.
  • Click it. The system will let you know if any updates are available.
  • You have the convenience of choosing the components of the update you’d like to push through. Always prioritize the security updates.
  • Click “OK” followed by “Install Updates”.

Step 11 – Refresh the OS to Eliminate Persistent Access Error 7874 Error

“Windows Refresh” is a lifesaver.

For those of you who are still with us and nothing has worked to eliminate the Error 7874, until recently, a fresh install of Windows would have been the only option.

Not anymore.

The Windows Refresh is similar to reinstalling your Windows OS, but without touching your personal data. That’s hours of backup time saved in a jiffy.

Through the Refresh, all your system files become good as new. The only minor annoyance is the fact that any custom apps you’ve installed are gone and the system applications you had uninstalled are back.

Still, it is the best bet as the final step of this process.

  • Enter the “Settings” of your PC and click on “Change Settings”.
  • Click “Update and recovery” and then choose “Recovery”.
  • Select “Keep my files”. This removes apps and settings, but lets your personal files live on.
  • You’ll get some warning messages about the apps that will be uninstalled. If you’ve gone through a recent OS upgrade, the Refresh process makes it so that you can’t go back to your previous OS version – if you should ever feel the need to do it.
  • Click the “Refresh” button.

Are you using an older version of Windows that doesn’t come with the power to “Refresh”?

Maybe it is time to start from scratch.

  • Enter your BIOS set-up.
  • This is where you need to change your computer’s boot order. Make it so that the boot happens not from the existing system files, but from the CD/DVD Drive.
  • Place the original Windows disk in the CD/DVD drive.
  • Turn on or restart the device.
  • Choose where you’d like the system files to be installed.
  • Your PC will restart several times as the process runs its course.


FAQ’s

Should I Bring My Computer to the Repair Shop if There are Runtime Errors Like Error 7874?

You can bring it to the repair shop but they will charge you a lot more than trying to fix it on your own or by using a specialized repair software. We would recommend trying some of the DIY ideas first such as diagnosing the problem and then working backwards from there. For example, if a specific program is causing it, try reinstalling the program. If that doesn’t work, try using a software to diagnose the errors on your system. As a last recourse, you can bring it to the repair shop.

What Do Runtime Errors Like Error 7874 Have to Do with the Windows Registry?

The Windows Registry is basically a collection of databases in MS Windows. The registry issues are usually the number one cause of runtime errors. The Registry may corrupt due to missing files or poor installation, leading to runtime errors. The problem can typically be solved by using a software designed to fix the Registry.

Will Removing Runtime Errors Like Error 7874 Improve My Start Up Speed?

Runtime errors have no impact on the start up speed since the error occurs while the program is running. It may, however, cause the OS to crash during or after start up. Correcting runtime errors will have no impact on the startup speed of the computer. It may just help you save time by reducing crashes and errors which may cause the computer to keep starting up.

Green Arrow

Start Download Now

Author:

Curtis Hansen

Curtis Hansen has been using, fiddling with, and repairing computers ever since he was a little kid. He contributes to this website to help others solve their computer issues without having to buy a new one.

Are you trying to use Microsoft Access, but are you getting the error ‘7874’?

Tech Support 24/7

Ask a Tech Specialist Online

Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.

Ask a Tech Specialist Online

On this page, you will find more information about the most common causes and most relevant solutions for the Microsoft Access error ‘7874’. Do you need help straight away? Visit our support page.

Error information

How to solve Microsoft Access error 7874

We’ve created a list of solutions which you can follow if you want to solve this Microsoft Access problem yourself. Do you need more help? Visit our support page if you need professional support with Microsoft Access right away.

Tech Support 24/7

Ask a Tech Specialist Online

Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.

Ask a Tech Specialist Online

Have you found a solution yourself, but it is not in the list? Share your solution in the comments below.

Need more help?

Do you need more help?

Tech experts are ready to answer your questions.

Ask a question

Hello
Sorry about that. It read OK on my PC. Hope this is better

Hello
I have an error message counting records in a query, or opening the query, using vba. The query runs correctly when executed manually when no VBA is running. I’m fairly sure this code ran a year ago as it is a once a year execution.

The code is intA = DCount(«*», «qryAdh1EmailAppel») in the middle of a sub

To simplify finding the problem, I have written a small sub:

Private Sub tstQueries1()

Debug.Print DCount(«*», «qryAdh1EmailAppel»)

End Sub

The execution stops on the Debug line with the message “Runtime Error 3078. The Microsoft Office Access database engine cannot find the input table or query ‘qryAdh1EmailAppel’. Make sure it exists and that its name is spelled correctly”

The query exists and the name is spelled correctly. If I press Debug to interrupt the process, switch to the manual window and try to execute the query I get the message “Unknown Access database engine error”. I press OK & return to the vba code, press F8 to continue, get the same message & now press End. I go back to the Access window & the query executes correctly.

The query has the following SQL:

SELECT * FROM qryAdhPrincA1 WHERE EMail Is Not Null AND ynUsage1=True;

If I change the sub to reflect the SQL of the query

Private Sub tstQueries2()

Debug.Print DCount(«*», «qryAdhPrincA1», «EMail Is Not Null AND ynUsage1=True»)

End Sub

Then it works correctly.
If I try to open the query instead of counting records:

Private Sub tstQueries3()

DoCmd.OpenQuery («qryAdh1EmailAppel»)

End Sub

Then it stops on the OpenQuery with the message: “Run-time error ‘7874’: Microsoft Office Access can’t find the object ‘qryAdh1EmailAppel’.”
I get the same error on executing manually as above.

This error occurs also on similar queries, but I haven’t detected a pattern.

The query is a based on a series of simple queries that I use elsewhere in the application. All the higher level queries work correctly in VBA & of course manually. The SQLs are (where I have taken out the brackets () for lisibility). I wonder whether the problem I due to the depth of cascading queries.

SQL of qryAdh1EmailAppel

SELECT * FROM qryAdhPrincA1 WHERE EMail Is Not Null AND ynUsage1=True;

SQL of qryAdhPrincA1

SELECT * FROM qryAdhPrincAx WHERE yAnnee=2011;

SQL of qryAdhPrincAx

SELECT *, yAnnee, ynRenouvellera FROM qryAdhPrinc INNER JOIN tblLicences ON qryAdhPrinc.[idAdherent] = tblLicences.[lnkAdherent] WHERE qryAdhPrinc.ynEpoux=No AND qryAdhPrinc.ynFamille=No AND tblLicences.strLicenceNb Is Not Null));

SQL of qryAdhPrinc

SELECT * FROM qryAdh WHERE ynEpoux=No;

SQL of qryAdh

SELECT *, IIf([ynepoux],[lnkAdherent],[idAdherent]) AS idAdhPrinc FROM tblAdherents ORDER BY Nom,Prenom;

I am using Access 2007 in Windows 7. All the updates have been included automatically.

Hello Experts:

I am using Access 2003 and VBA (SQL SERVER 2000 backend) to create a table . However when I try to access it to save its contents as a CSV file, it says

Run-Time error ‘7874’: can’t find the object table

HOWEVER, if I manually reconnect to the server (File —> Connection),  the table is there, and AFTER this reconnection, the code can find the table and do the export etc. properly.

To enact the above in code, I added code to close the connection, reconnect, and refresh the database window. It still gives me the above error. Please help if you can.

Here is the code:

‘ To create the table

Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Open «Provider = sqloledb.1; data source = myPC; intial catalog = myDB; integrated security = sspi»
cn.Execute «exec myDB.dbo.spmySP ‘» & strBatchDone & «‘ «

‘ Server = myPC; database = myDB; stored proc to create table = spmySP

‘ To close, reconnect and to refresh database window

cn.close
cn.Open «Provider = sqloledb.1; data source = myPC; intial catalog = myDB; integrated security = sspi»
RefreshDatabaseWindow

‘ To export a CSV file based on myTable, created using the stored proc above

   DoCmd.TransferText acExportDelim, , «myTable», «c:\temp\» strBatchDone & «.csv», -1

Please note that the syntax etc is correct as the above works fine when I go step by step manually. In code, the last line (DoCmd.Transfer……) gives the run-time ‘7874’ eror, saying Myable can’t be found, even though it is created and does exist.

TIA

j-d

Понравилась статья? Поделить с друзьями:
  • Номер ошибки 678 при подключении к интернету
  • Ноутбук леново ошибка при включении
  • Номер ошибки 5123
  • Номер ошибки 522
  • Ноутбук не открывает фотографии ошибка файловой системы