Runtime error 2147352567 80020009 в чем проблема
Thanks. We have received your request and will respond promptly.
Come Join Us!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts - Keyword Search
- One-Click Access To Your
Favorite Forums - Automated Signatures
On Your Posts - Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Posting Guidelines
Promoting, selling, recruiting, coursework and thesis posting is forbidden.
RunTime Error -2147352567 (80020009)
Hi I have read several posts concerning this error but mine doesn't seem to match up.
I have a single form that has several text boxes. What I am trying to do is clear the text boxes when the form is opened. I get the above error everytime and I don't understand why. I checked the data tab and it is not tied to any table at this point. Does anyone have any ideas? Here is my code:
Private Sub Form_Open(Cancel As Integer)
Set db = CurrentDb()
'clear the fields
nill = DSGStorageClear()
'DoCmd.GoToRecord , , acNewRec
End Sub
Function DSGStorageClear()
'clear the boxes
TxtContractNum = ""
TxtSubdivisionName = ""
LocationDescription = ""
BOXNum = ""
DateSentDSGBox = ""
DSGBoxNumOrdered = ""
end Function
Originally the text boxes were titled the same as the database field so I added txt to two of them to see if that was the problem and I still receive the same error.
Thanks
Lhuffst
Must have been brain dead! I fixed the problem. The programmer before me had each text box tied to a field but this caused empty records to be inserted into the database. Since one of the operations that he was doing in 97 didn't convert cleanly, I decided not to bring them to a new record but a blank screen where they had to click save. I had removed the table from the data but forgot to do the text boxes. Thanks anyway.
sorry for wasting anyones' time.
Lhuffst
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.
Причина
Ограничения безопасности препятствуют запуску веб-страницы или доступу к Excel.exe.
RunTime Error -2147352567 (80020009)
Обходной путь
Точно следуйте всем указаниям из этого раздела. Внесение неправильных изменений в реестр может привести к возникновению серьезных проблем. Прежде чем приступить к изменениям, создайте резервную копию реестра для восстановления на случай возникновения проблем.
Удаление или изменение следующего значения реестра:
Запустите редактор реестра. Для этого используйте одну из следующих процедур.
- Windows 10: щелкните правой кнопкой мыши или нажмите кнопку Начните, а затем выберите Запустить, чтобы открыть диалоговое окно Run.
- Windows 8: Нажмите клавиши Windows+R, чтобы открыть диалоговое окно Выполнить.
- Windows 7 или Windows Vista: нажмите Пуск, а затем выберите команду Выполнить, чтобы открыть диалоговое окно Выполнить.
Введите regedit.exe и нажмите клавишу ВВОД.
Найдите и выделите подраздел реестра:
В меню File нажмите кнопку Выход, чтобы выйти из редактора реестра.
Этот параметр политики контролирует, могут ли макрос работать в приложении Office, которое открыто программным путем другим приложением.
Если включить этот параметр политики, можно выбрать из трех вариантов управления поведением макроса в Excel, PowerPoint и Word, когда приложение будет открыто программным путем:
- Макрос включен (по умолчанию) — Макрос может запускаться в приложении с программным открытием. Этот параметр обеспечивает выполнение конфигурации по умолчанию в Excel, PowerPoint и Word.
- Уровень макробезопасности приложений пользователя — функциональность макроса определяется параметром в разделе "Макрос Параметры" Центра доверия.
- Отключить макрос по умолчанию . Все макрос отключены в приложении с программным открытием.
Если этот параметр политики отключен или не установлен, любая отдельная программа, используемая для запуска Microsoft Excel, PowerPoint или Word, может запускать макрос без блокировки.
I have form that takes two locations and parses (from google) a driving distance calculation between the points back to a control [txt_Distance] on my form.
I have never changed anything after it was working just fine. I didn’t use it for a long time, but It has always 100% worked. After a long time, I resumed using it today, and now for some inexplicable reason I now get an error:
Runtime error ‘-2147352567 (80020009)
The value you entered isn’t valid for this field
Driving distance between two points
Private Sub btn_Distance_Click()
txt_Distance = getGoogleDistance(Me.txt_Arrive_Destination.Column((1)) & (Me.txt_Arrive_State), Me.txt_Depart_Destination.Column((1)) & (Me.txt_Depart_State))
The table field that control ‘txt_Distance’ is linked to is set to ‘Text’
I also tried my other function, it too returns an identical error message:
Driving time between two points
Private Sub btn_TravelTime_Click()
txt_TravelTime = getGoogleTravelTime(Me.txt_Arrive_Destination.Column((1)) & (Me.txt_Arrive_State), Me.txt_Depart_Destination.Column((1)) & (Me.txt_Depart_State))
The table field that control ‘’ txt_TravelTime’ is linked to is set to ‘Date/Time’ (Short format)
Can anyone shed some light on what may be going wrong here?
NB: I have multiple development copies of the same database, and they all throw the same errors.
This thread is locked. You can follow the question or vote as helpful, but you cannot reply to this thread.
Report abuse
Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Community
- Creo (Previous to May 2018)
- Creo Modeling Questions
- VBA run-time error -2147352567(80020009)
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
VBA run-time error -2147352567(80020009)
. -10-11-12-13 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Email to a Friend
I am a beginner of PROE.
I've been trying to connect creo parametric by using Excel VBA.
Below is my sample code.
Dim asyncConnection As IpfcAsyncConnection
Dim cAC As CCpfcAsyncConnection
Dim session As IpfcBaseSession
Dim descModel As IpfcModelDescriptor
Dim descModelCreate As CCpfcModelDescriptor
Dim model As IpfcModel
Dim workDir As String
workDir = "C:\Program Files\Creo 2.0\Parametric\bin\parametric.exe"
Set cAC = New CCpfcAsyncConnection
Set asyncConnection = cAC.Start(workDir, "Working Directory")
And then, I got an run time error like below.
run-time error -2147352567(80020009)
pfcExceptions::XToolkitGeneralError
What is this error, and how to resolve this error?
MarkStallard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Email to a Friend
I don't use VBA, so I can't test your code myself.
Here is what I found in the Creo Parametric VBAPI documentation:
'======================================================================
'First Argument : The path to the Creo Parametric executable along with command
'line options. -i and -g flags make Creo Parametric run in non-graphic,
'non-interactive mode
'Second Argument: String path to menu and message files.
'======================================================================
Set cAC = New CCpfcAsyncConnection
Set asyncConnection = cAC.Start(txtExePath.Text + " -g:no_graphics -i:rpc_input", "." )
The second argument should be the name of a directory (folder), like "C:\Program Files\Creo 2.0\Parametric".
The example above uses the directory ".", which is the current working directory that the program is running in.
That works only if you launch the program from the directory that contains menu and message files.
In your code, you use the string "Working Directory":
Dim workDir As String
workDir = "C:\Program Files\Creo 2.0\Parametric\bin\parametric.exe"
Set cAC = New CCpfcAsyncConnection
Set asyncConnection = cAC.Start(workDir, "Working Directory")
The directory name "Working Directory" is almost certainly incorrect. I believe this is the reason why your program crashed.
You also used the variable named "workDir" to contain the pathname of Creo Parametric. That won't cause a crash, but it will confuse anyone who reads the program, including yourself .
вот часть трассировки стека из недавнего запуска ненадежного приложения, написанного на Python, который управляет другим приложением, написанным в Excel:
очевидно, что-то пошло не так . но что?[1] Эти коды ошибок COM кажутся чрезмерно загадочными.
[1] я действительно знаю что пошло не так в этом случае, он пытался получить доступ к имени prperty на объекте диапазона, который не имел свойства Name. не все ошибки так легко найти!
кстати, вы можете использовать утилиту "поиск ошибок", которая поставляется в Visual Studio (C:\Program Файлы\Microsoft Visual Studio 9.0\Common7\Tools\ErrLook.exe) в качестве быстрой стартовой площадки для проверки кодов ошибок COM. Эта утилита также вызывает FormatMessage для вас и отображает результат. Не все коды ошибок будут работать с этим механизмом, но многие. Обычно это моя первая остановка.
обработка ошибок и отчетность в COM немного грязная. Я постараюсь дать вам кое-какую информацию.
все вызовы метода COM вернут числовой код, называемый HRESULT, который может укажите успех или неудачу. Все формы отчетов об ошибках в COM строятся поверх этого.
коды обычно выражаются в шестнадцатеричном формате, хотя иногда вы увидите их как большие 32-разрядные числа, как в трассировке стека. Есть все виды стандартных кодов возврата для общих результатов и проблем, или объект может возвращать пользовательские числовые коды для особых ситуаций. Например, значение 0 (s_ok) универсально означает "нет ошибки", а 0x80000002-E_OUTOFMEMORY. Иногда Коды HRESULT возвращаются объектом, иногда инфраструктурой COM.
чтобы усложнить дело, поздние связанные COM-объекты (которые используют механизм com Automation или IDispatch) добавляют некоторые слои, которые необходимо очистить, чтобы получить информацию. Excel обычно обрабатывается с помощью поздней привязки.
теперь посмотрим на вашу ситуацию. То, что вы получаете в качестве первого числа, является довольно общим кодом ошибки: DISP_E_EXCEPTION. Примечание: обычно вы можете выяснить официальное имя HRESULT, погуглив номер, хотя иногда вам придется использовать версию hex, чтобы найти что-нибудь полезное.
ошибки, начинающиеся с DISP_, являются кодами ошибок IDISPATCH. Ошибка свободно означает "было исключение COM, вызванное объектом", с дополнительной информацией, упакованной в другом месте (хотя я не совсем знаю, где; мне придется искать его).
в данном случае мы зашли в тупик:
код ошибки "пользовательский", и приложение нужно документировать, что это такое, за исключением того, что Excel этого не делает. Кроме того, Excel (или фактический источник ошибки), похоже, не предоставляет никакой дополнительной информации через IErrorInfo.
Excel печально (по крайней мере для меня) для загадочных кодов ошибок от автоматизации и неясных ситуаций, которые их вызывают. Это особенно верно для ошибок, которые можно было бы рассматривать как "ошибки времени разработки" ("вы должны были знать лучше, чем вызов метода, который не существует в объекте"). Вместо хорошего "Не удалось прочитать имя свойства", вы получаете"Ошибка времени выполнения "1004": ошибка, определенная приложением или объектом" (который я только что получил, пытаясь получить доступ к свойству Name в диапазоне, от VBA в Excel). Это не очень помогает.
проблема не маршрутизируется на Python или его интерфейс для Excel. Сам Excel не объясняет, что произошло, даже для VBA.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.
Click Here to join Tek-Tips and talk with other members! Already a Member? Login
При нажатии кнопки Импорт с SharePoint "Импортная таблица" в SharePoint вы получите следующую ошибку:
Произошла непредвиденная ошибка. (-2147352567).
Читайте также: