Gasman
Enthusiastic Amateur
- Local time
- Today, 11:33
- Joined
- Sep 21, 2011
- Messages
- 17,405
I'm trying to create an ACCDE file from within my database.
I discovered code on the net
	
	
	
		
and am calling it from
	
	
	
		
The paths are correct in debugger, I do not get any error but the accde is not created.
I've also tried
	
	
	
		
that I found on this forum, but this just crashes and restarts Access (even if I change mde to accde) and brings up a dialogue about Digital certificate?
Has anyone managed to achieve this?, and if so could you please tell me how?
TIA
 I discovered code on the net
		Code:
	
	
	Public Function MakeACCDE(InPath As String, OutPath As String)
Dim app As New Access.Application
app.AutomationSecurity = 1 'msoAutomationSecurityLow
app.SysCmd 603, InPath, OutPath
Set app = Nothing
End Function
		Code:
	
	
	Private Sub cmdCreate_Click()
Dim strFEPath As String, strBEPath As String, strACCDE As String
Dim Dummy As String
strFEPath = CurrentDb.Name
strBEPath = GetBackEndPath()
strACCDE = Left(strBEPath, InStrRev(strBEPath, "\") - 1) & "\Employee.accde"
Dummy = MakeACCDE(strFEPath, strACCDE)
End SubThe paths are correct in debugger, I do not get any error but the accde is not created.
I've also tried
		Code:
	
	
	Sub CreateAccde()
If MsgBox("Make a new MDE file?", vbYesNo) = vbYes Then
SendKeys "%T"
SendKeys "D"
SendKeys "M"
SendKeys "C:\DB\DB1.mde"
SendKeys "%S"
SendKeys "{ENTER}"
End If
End SubHas anyone managed to achieve this?, and if so could you please tell me how?
TIA
 
	 
 
		 
 
		 
 
		

 
			