473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Create an accde file using VBA

Is it possible to create an accde file from an accdb file using VBA? Either the currently open database or one that is external to the currently open database would work for the purpose I have in mind.

You guys are geniuses so I know that if it can be done one of you will have the answer so thanks in advance!

m
Jan 18 '19 #1
3 2454
NeoPa
32,556 Expert Mod 16PB
Have you considered Application Automation?
Jan 18 '19 #2
twinnyfo
3,653 Expert Mod 2GB
This will work for converting a different, non-open DB:

Expand|Select|Wrap|Line Numbers
  1. Public Sub CreateACCDE()
  2.     Dim strDBFile As String
  3.     Dim strDEFile As String
  4.     Dim objACC As Access.Application
  5.  
  6.     strDBFile = "C:\DBFile.accdb"
  7.     strDEFile = "C:\DBFile.accde"
  8.  
  9.     Set objACC = New Access.Application
  10.  
  11.     objACC.SysCmd 603, strDBFile , strDEFile 
  12.     objACC.Quit acQuitSaveNone
  13.  
  14.     Set objACC = Nothing
  15. End Sub
I personally prefer to do it manually, so I can see if there were any errors during the compile.

Hope this hepps!
Jan 18 '19 #3
NeoPa
32,556 Expert Mod 16PB
Am I missing something? The code simply does the conversion. The compiling step isn't included.

Doesn't that mean the user would still see the compiler errors directly? Also that the requirement would be for a non-open and compiled database file?

PS. Well done for providing the code. I hadn't realised that step was an undocumented one when I suggested they look up Application Automation.
Jan 19 '19 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Lauren Quantrell | last post by:
Is there a way to create a text file (such as a Windows Notepad file) by using a trigger on a table? What I want to do is to send a row of information to a table where the table: tblFileData has...
0
by: jarrel | last post by:
do anyone know how to create xml file with using C and converting to Pocket PC?please provide me some source code.your help is highly appreciated.thanks
1
by: NagaKiran | last post by:
Hi I am able to display XML contents in a treeview. But I am unable to create an XML file using treeview data. I have a TreeView control wich contains many levels of data.I want create write...
0
by: RadhakrishnanR | last post by:
Can you give the direction to do the following : I want to create batch file from VB6.0 application. In that creating batch file i want to pass the userid, password, FTP server Ip address. i.e...
1
by: Eran.Yasso | last post by:
Hi, Can anyone please tell me how can i create xls file? i then need to write to it. I am creating the file using File.Create(file.xls); but ican't acces the file. i gt error that the file is...
7
by: Supriya | last post by:
Hi All, Is there any way to create .chm file programmatically? Please let me know. Thanks in advance. Supriya
1
by: fruityfreak | last post by:
Hello... Any idea how to create PDF file using PHP codes...
3
by: brook | last post by:
hey all - i´m new to php and having trouble writing a simple code which should create a file. here is the most simplified version: <?php $content = "my content"; $path = "test.txt";...
3
by: bhagyap | last post by:
Hi.. I have checkedlistbox in Form1 which gives me path of an folder with the checked items now using the checked items(path) i want to create XML File and populate it into TreeView in Form2.. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.