Product, powershell studio 2020 64 bit:
Operating system:
64 bit OS windows 10
I’m working on a script that uses the object access.application
When using the project it does not show any of the suggested commands under the .docmd.
$access= new-object -com access.application
$access.docmd.(nothing is suggested in studio, but in ISE it gives you a list.
Also when a error happens it gives the same error every time, ISE gives you a lot more details on errors. Like query isn’t in right format and so on.
I can attached screen shots if needed, but didn’t know if this was a known thing, I have a setting wrong, or something else.
Application access object .docmd
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Application access object .docmd
Please can you provide a screenshot of the error, and it would help to have the version of Access you are currently working.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Application access object .docmd
Please also include if this is a 64 bit or a 32 Bit version of Access.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Application access object .docmd
Sorry of the long wait.
Access is 2016, 32bit. Whole company uses the 32bit version.
When running in the debug it says error "ERROR: You entered an expression that has an invalid reference to the property FileSearch. This is the same error i get for all errors when running the .docmd commands.
Access is 2016, 32bit. Whole company uses the 32bit version.
When running in the debug it says error "ERROR: You entered an expression that has an invalid reference to the property FileSearch. This is the same error i get for all errors when running the .docmd commands.
Re: Application access object .docmd
I had issues trying to add a screenshot, here are the screenshots compare the two.
- Attachments
-
- Error in Studio
- Studio.png (19.19 KiB) Viewed 3074 times
-
- What error should be in ISE
- ise.png (15.02 KiB) Viewed 3074 times
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Application access object .docmd
PowerShell Studio does not add to or subtract from any PowerShell error messages. We only output what the Windows PowerShell engine sends.
We have absolutely no means to investigate why the ISE would display a different error message.
I understand that this is frustrating, but you need to ask Microsoft about that.
From what little Google tells me about this, the file search property has been removed a long time ago from the Access object.
Alternatively, you could just capture the exception in your script yourself and provide some more meaningful error message based on the situation.
We have absolutely no means to investigate why the ISE would display a different error message.
I understand that this is frustrating, but you need to ask Microsoft about that.
From what little Google tells me about this, the file search property has been removed a long time ago from the Access object.
Alternatively, you could just capture the exception in your script yourself and provide some more meaningful error message based on the situation.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.