I am quite new at this Access stuff – I received the following error message : 438 object doesn’t support this property or method at cmdExport_click. I understand the problem is with the command button, but what exactly is wrong?
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Objects
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Objects
- This topic has 4 replies, 4 voices, and was last updated 23 years, 11 months ago.
Viewing 1 reply threadAuthorReplies-
H. Legare Coleman
AskWoody PlusMay 21, 2001 at 2:51 pm #526908The problem is with the VBA code that runs when the button is pressed. I am really an Excel VBA programmer, and I don’t know exactly how Access works here. If the message box has a Debug button on it, that should show you the line of code that is causing the problem. If you copy the code around the line causing the error (preferably the whole Sub or Function if it isn’t too big), and paste it into a message here, someone can probably help you.
-
WScharlotte
AskWoody LoungerMay 22, 2001 at 4:44 am #526998What it is telling you is that you tried to do something that Jet doesn’t consider legal for the object you are using.
For example, if you use Access 2000 and have both DAO and ADO references set but don’t specify which flavor of recordset you dim in a procedure, the code will compile, but you’ll get an error 438 when you get down to specifics like trying to do a findfirst, which is a DAO method, when Access thinks you should be using find, which is an ADO method.
As Legare says, post the code so we can give you a more specific answer.
-
WSjulieg
AskWoody LoungerMay 22, 2001 at 1:10 pm #527046Here is the code for the command button. The button is supposed to export data to an excel file.
On Error GoTo ErrorHandler
Dim whoami As Stringwhoami = “cmdExport_Click”
‘dynamically Drop the AccessImport Query, CreateQuery
for a new
‘one of the same name; then perform the export;
‘repeat the entire operation
Dim lsFile As String
Dim objExcel As Object
Dim rs As RecordsetDoCmd.DeleteObject acQuery, “AccessImport”
‘ -
WSLonnieB
AskWoody LoungerMay 22, 2001 at 1:52 pm #527056Julie, we were all new to Access at one time. This forum is a great place to learn stuff.
If all you want to do is transfer information from Access to Excel, you can do this with a macro.
Click on the Macro tab on the database window. Click on the New button. In the Action column, click the dropdown arrow. It shows you the list of Actions. The first Action I usually run is a make table query. Select OpenQuery from the list of actions and enter the name of your query. If you don’t need to query for information, you can skip this step.
The next Action is the TransferSpreadsheet action. In the Action Arguments section of the macro design window, there are six arguments that you have to fill in. They are self-explanatory. The Transfer Type is Export. Be sure to type in full path to the File Name in Excel, such as c:MyDocumentsAccessMyData.xls.
Add the RunApp action as the next, and last, action you need in this macro. It has one argument, Command Line. Here is a typical command line:
c:Program FilesMicrosoft OfficeOfficeexcel.exe c:MyDocumentsAccessMyData.xls
Be sure an place a space between excel.exe and c:.
Save it, name it, and run it. If you do it right, this will work well for you.
HTH.
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Win11 24H4 Slow!
by
Bob Bible
10 minutes ago -
Microsoft hiking XBox prices starting today due to Trump’s tariffs
by
Alex5723
15 minutes ago -
Asus adds “movement sensor” to their Graphics cards
by
n0ads
2 hours, 9 minutes ago -
‘Minority Report’ coming to NYC
by
Alex5723
1 hour, 4 minutes ago -
Apple notifies new victims of spyware attacks across the world
by
Alex5723
10 hours, 51 minutes ago -
Tracking content block list GONE in Firefox 138
by
Bob99
10 hours, 15 minutes ago -
How do I migrate Password Managers
by
Rush2112
1 hour, 1 minute ago -
Orb : how fast is my Internet connection
by
Alex5723
7 hours, 48 minutes ago -
Solid color background slows Windows 7 login
by
Alex5723
22 hours, 31 minutes ago -
Windows 11, version 24H2 might not download via Windows Server Updates Services
by
Alex5723
21 hours, 1 minute ago -
Security fixes for Firefox
by
Susan Bradley
2 hours, 12 minutes ago -
Notice on termination of services of LG Mobile Phone Software Updates
by
Alex5723
1 day, 9 hours ago -
Update your Apple Devices Wormable Zero-Click Remote Code Execution in AirPlay..
by
Alex5723
1 day, 18 hours ago -
Amazon denies it had plans to be clear about consumer tariff costs
by
Alex5723
1 day, 9 hours ago -
Return of the brain dead FF sidebar
by
EricB
20 hours, 30 minutes ago -
Windows Settings Managed by your Organization
by
WSDavidO61
1 hour, 41 minutes ago -
Securing Laptop for Trustee Administrattor
by
PeachesP
5 hours, 24 minutes ago -
The local account tax
by
Susan Bradley
21 hours, 51 minutes ago -
Recall is back with KB5055627(OS Build 26100.3915) Preview
by
Alex5723
2 days, 7 hours ago -
Digital TV Antenna Recommendation
by
Win7and10
1 day, 23 hours ago -
Server 2019 Domain Controllers broken by updates
by
MP Support
2 days, 19 hours ago -
Google won’t remove 3rd party cookies in Chrome as promised
by
Alex5723
2 days, 20 hours ago -
Microsoft Manager Says macOS Is Better Than Windows 11
by
Alex5723
3 days ago -
Outlook (NEW) Getting really Pushy
by
RetiredGeek
2 days, 2 hours ago -
Steps to take before updating to 24H2
by
Susan Bradley
25 minutes ago -
Which Web browser is the most secure for 2025?
by
B. Livingston
2 days, 6 hours ago -
Replacing Skype
by
Peter Deegan
1 day, 19 hours ago -
FileOptimizer — Over 90 tools working together to squish your files
by
Deanna McElveen
2 days, 17 hours ago -
Excel Macro — ask for filename to be saved
by
nhsj
1 day, 15 hours ago -
Trying to backup Win 10 computer to iCloud
by
SheltieMom
1 day, 19 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.