I tried many times with the database I built and with database with little to no tables. I always ended up getting error message:
Microsoft Access was unable to create the .accde, .mde, or .ade file.
Please advise
I tried many times with the database I built and with database with little to no tables. I always ended up getting error message:
Microsoft Access was unable to create the .accde, .mde, or .ade file.
Please advise
Perhaps you need to provide the db for analysis.
Does this happen with all db's or just one?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
The table and query seems to be fine only after adding VBA code is not. The program runs with no issues. Although I put on error resume next. There might be some cases of 5 divide 0 or 5 divide null. Don’t know if this caused it now to convert to ACCDE.
But don’t know why I can’t conver it to ACCDE
ACCDE files can only be created if the database can be compiled without error.
To solve, do the following
In the VB Editor ... Options, tick Require Variable Declaration.
From now on, Access will tell you if you haven't defined a variable datatype
Doing this will add the line Option Explicit as the second line in all new code modules.
However it won't do so for existing code modules so go through and add the line yourself in all module code.
Still in the VBE, click Debug....Compile.
Fix any compile errors found. When fully compiled, the Compile menu item will be disabled.
When done, create your ACCDE
Can you use On Error Resume Next because fix it all without any bugs without the On Error Resume Next I think will take me a bit and doing so I’m afraid other error or bugs might appear. As of right now the output is what I wanted. And it works to perfection. Hope you understand.
How does the program know you don’t have bugs I guess by us compiling it they give us the Ok to then convert to ACCDE.
Please advise ! Thanks
This is not good bc when someone enters the wrong data type and runs it without on error resume next the program will stop and give an error message.
vba code doesn't read minds, you need to handle all errors as required. On Error Resume Next is one way, but only if you subsequently manage the error e.g
on error resume next
..do something
if err=0 then
ok to continue
else
handle error
end if
Ridders52,
I did as you said,
Removed on error resume next,
Put option explicit
Run it with no error.
I still can’t create exe file and still have that error message.
My program works with pptx files.
Please advise.
You can't easily create an exe file from an access database, without buying specialist software tools. I have no idea what this has to do with a powerpoint file.
You can create a compiled accde file, that can't easily be reverse engineered, but you would need to maintain a working version of the original accdb file to enable you to carry out any maintenance.
Your forms and code should trap any defective data entry, and handle any potential errors in an elegant fashion.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
no mention here of compiling the codeRidders52,
I did as you said,
Removed on error resume next,
Put option explicit
Run it with no error.
How can you create a compiled ACCDE file. Could you post steps. I meant the program added/deleted/altered PowerPoint files, just saying that not sure if that caused it to have the error and not be able to create ACCDE file but I guess not base on what you said.
Go back to post #4 where I explained how to compile your code. You will have at least one error to fix and possibly more.
When all the errors are fixed the project will be fully compiled.
At that point, save a copy of the file as ACCDE for distribution.
Some people ever to that as an Access executable but that slightly misleading in that it can't run unless Access is installed
Make sure you keep the original ACCDB file for future development work
I reviewed your post 4 and I did as that with no error. I was able to create a ACCDE, however people can still use shift and left click to open it and see the tables and can delete the table. While in name is an exe but doesn’t act or work like one. Please advise
no, not in name otherwise the filetype would be .exe. your question was about creating a .accde. A .exe contains only code. A .accde also contains objects, tables, queries etc.While in name is an exe but doesn’t act or work like one.
To prevent users viewing/changing/deleting tables is a different question. No system is completely safe so the first question you need to clarify is to what you are protecting, from whom and why - and is protecting the tables sufficient for your purposes - what about queries? considerations around sql injection?. To protect tables, perhaps the simplest answer is to use a sql server back end which has a much higher level of security than access.