ACCDE not working

RPrasad

Board Regular
Joined
Mar 22, 2008
Messages
144
Hi - I have converted .accdb to .accde, after the conversion macros not working. Before converting I have compiled the codes and haven't find any errors. I donot want the users to have copy .accdb Please suggest any work around for this. Thank you
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
So when you say the macros aren't working - can you give an example of one that should be working and it isn't?
 
Upvote 0
Hi Bob here are the details, I get the error message: "The expression on click you entered as the event property setting produced the following error: An expression you entered is the wrong data type for one of the arguments"

But this is working fine in accdb

Code:
Private Sub cmdSMail_Click()
 
                Dim MySet As ADODB.Recordset
                Set MySet = New ADODB.Recordset
                MySet.Open "tblEmp", CurrentProject.Connection, adopenstatic
 
                    Do Until MySet.EOF
                        [Forms]![frmMain].[txtMyEID].Value = MySet![EID]
                        [Forms]![frmMain].[txtMyEmail].Value = MySet![Email]
 
                        DoCmd.SendObject acQuery, "CostCenterDetails", "Excel97-Excel2003Workbook(*.xls)", [Forms]![frmMain].[txtMyEmail], "", "", [Forms]![frmMain].[txtMySub], [Forms]![frmMain].[txtMyMsg], False, ""
 
                        MySet.MoveNext
                    Loop
 
                MsgBox "Emails sent out successfully!"
 
 
End Sub
 
Upvote 0
First off - see if this helps before we go further. When calling a procedure, if you aren't passing a parameter, leave the parameter blank and just include the comma. So don't use "" or " " as it doesn't like that.

So this:
Code:
DoCmd.SendObject acQuery, "CostCenterDetails", "Excel97-Excel2003Workbook(*.xls)", [Forms]![frmMain].[txtMyEmail], "", "", [Forms]![frmMain].[txtMySub], [Forms]![frmMain].[txtMyMsg], False, ""

Should actually have this for the arguments (and for the Output Type and type should not be acQuery but acSendQuery I believe unless it has changed in Access 2007 and above):
Code:
DoCmd.SendObject acSendQuery, "CostCenterDetails", acFormatXLS, Forms!frmMain.txtMyEmail, , , Forms!frmMain.txtMySub, Forms!frmMain.txtMyMsg, False
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top