Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Hide Access 2 < Hide Access | ACCDT Template >
Back to Hide Access 2    Comments List
Transcript Pinned    Upload Images   Link   Email  
Richard Rost             
2 months ago
Welcome back to my Hide Access series. This is part two of two, where I'm going to show you how to get rid of all the naysayers, all the Access haters, and make your database look like it's not Access, even though you should be Access and proud. But I get it.

Alright. So in yesterday's video, we hid lots of stuff. We hid the navigation pane. We hid the right-click menus. We hid most of the ribbon, but you still got this big red bar across the top here. Let's turn the ribbon, the toolbar, completely off. Now, in order to do that, we're going to need a little VBA. That's why I marked this a developer-level video. Now, if you've never done any VBA programming before, go watch this video first. It'll teach you everything you need to know in about 20 minutes. We're really only going to need one line of code today, but you got to know where to put it.

Alright, so when the database starts up, we need to run one line of code to hide this ribbon interface. Now, normally, we'd put that inside of our startup form, or in your autoexec macro if you want to. I prefer the startup form, but we can't right-click anymore because we've disabled the right-click menu. So we have to shut the database down, and then you're going to click on the shortcut. You're going to hold down the shift key now, let the mouse go completely. Hold down the shift key and then double click on the shortcut. That's going to bypass the startup.

Alright, now we'll open up this database with all of the stuff that we just turned off back on again. Now, you can disable that. You can make it so that shift bypass no longer works. I do cover that in my full security seminar. That's a lot more involved, a lot more VBA code, but the average user isn't going to know that. Unless they know Microsoft Access, they're not going to know to do that. And even so, we're going to be making an ACCDE file in a minute. It'll be encrypted, and even if they do get in here, they won't be able to change anything. So don't worry about that.

Alright, but now that we are in here, let's go into our main menu, right-click, design view. Let's open up its properties, go to events, and either Unload or On Open'either one. It doesn't really matter for this particular case. Go to the dot-dot-dot, open up the VBA code editor.

Alright, here I am in my form load event, and it's going to be DoCmd.ShowToolbar, and then in quotes, "Ribbon", comma, acToolbarNo. Okay? That's it. Save it. Throw in a debug compile. Always, this is on the checklist too, make sure you compile your database before you try distributing it. Make sure all the errors are out of it. Syntax errors.

Now, close the database, open it up again normally this time, double-click, and there you go, look at that. The toolbar up top is completely gone, and now, just looking at it, you cannot tell this is Microsoft Access. There's no right-click menu, there's no ribbon. This is the standard Windows menu, the navigation pane is gone, you change all your icons, change the splash screen, right? Unless someone is really an expert in Access, they're not going to know the fact that this is Access, right here.

You can change that, put your logo here, change this. I did all this for my screenshot for the title slide, but you've got all this covered in the blank database video and how to make a main menu if you want to get a kick out of it. Pause it and read this. This is pretty cool stuff.

But see, you can make it look like it's not Access. I forgot to change the form level one there, and someone might recognize that as an Access form icon. Oh, big deal. Most people won't know it. So we're pretty much there. We're getting there. Doesn't look like Access at all.

So we hid the ribbon. I got to hide the ribbon and status bar here because when I made this, I forgot that you can also turn off the status bar in the file options, but there's VBA code you can use to hide the status bar as well if you want to do that in code. Because you can turn it on and off, but just use the file options menu to turn the status bar off. That's fine.

Alright, I'm going to skip "Make sure all errors are handled" for now. Let's talk about debug compile the database'we just did that. You want to make sure you debug and compile the database because if you have any syntax errors in your code, so if it's typed in wrong, or it's referring to fields that don't exist, or undeclared variables, that's going to generate a runtime error and the compiler will catch that and you also will not be able to make an ACCDE file.

Yeah, it's a PowerPoint, leave me alone. You will not be able to make an ACCDE file if there are syntax errors in your code, so make sure you debug compile.

Now that brings me back to "Make sure all errors are handled," because the compiler will catch syntax errors, but it won't catch runtime errors. It won't catch errors in your code logic, for example.

Now, this is a pain because any time you want to go back in and make changes in the database, you've got to close it and do the shift, double-click trick that I showed you earlier. Now you can get back in.

And what I usually do is I usually do all that lockdown stuff after I make the ACCDE file. I put it in code in a button, but that's up to you. And that's, again, stuff I cover in the security seminar.

But let's just say real quickly, maybe in your customer form. And again, you want to go through and change the icons, either one at a time. You could change them for all the forms, or you want to do that thing where I change all the system icons for the database and the forms themselves. Otherwise, you'll see the little Access logo in here.

But what you want to do is, let's say you've got a field in here, and you're doing some math on it. I'll just change this button right here. Let's say the Contacts button. All right, let's say we're going to say dim x, and we're going to say x equals 100 divided by zero, and then message box x. You probably see where I'm going with this.

Right now, debug compile it. It looks fine. Nothing, there's no problem. If I come back in here now and I'm not going to close the database and open it back up with all the stuff locked down. I'm back, and we don't know that's a database, right? The customer form, contacts, boom! Database. Customer form, contacts, boom. See? You get the Microsoft Visual Basic division by zero error, and someone who knows Access will know that this is, you know, a VBA error. They'll know that this was probably built in Access.

So, if you want to hide that, make sure you've got debugging for any possible spot in your database where it can cause an error, all right? And if you don't give them an ACCDE file, they'll be able to do this and hit "Debug," and it will open up the VBA editor. This does not open up if you've got an ACCDE file or if they're running off the runtime edition.

So, I'm going to get rid of this. Goodbye. Save it. Close it. And we should be good.

As far as error handling goes, I talk about it in a lot more detail in this video. I spend some time covering the basics in Access Developer 2 and I spent a lot more time on it in Access Developer 15. We call it debugging level 2, where I cover all kinds of other stuff like watches, breakpoints, the immediate window, all that kind of stuff.

Alright, next up: make sure you compact and repair your database. Everyone should know how to do that. Alright, Database Tools, Compact and Repair'it's that simple. Again, I've got a whole separate video on it, go watch this to learn more.

Alright, next up, we're going to make an ACCDE file, an encrypted or execute only file depending on who you ask. And this is a version of your database that the user can't make any design changes to, okay? Again, got a whole separate video on this one. I'll put a link down below. Go watch this. This is a good one.

Now, for this one, I'm going to go into the database folder and I'm going to open up the original ACCDB file and I'm going to hold down shift and open that up. So it bypasses the startup. When you do that, it normally opens up behind the window you're in. So just be aware of that. Sometimes, like if this window is really big, right, you might be sitting here wondering where is the database. It's in the background. That's one of those glitches with Access. Sammy, you can put that on the list too. I don't know why that, he's keeping a list of all the things that we're going to suggest to Microsoft because I don't know why it opens up in the background, but it does.

And now we're going to go into File, Save As, make a CCD file, okay, RixDB.ACCDE, save it, hope that there's no errors. Okay, because if you got any compile errors, it's going to tell you, I can't make an ACCDE file. Right? You got to go and figure out why not. One of the troubleshooting things I recommend, by the way, if that happens and you can't find the error, if you do a debug compile and you can't find the error, just start removing objects one at a time. Right? Take out, start with forms, remove those, remove modules, remove reports, and eventually, you'll get to a point where you can make the ACCDE file and that's probably the culprit. There could be a bug in there or something's corrupted. So there are lots of other things to do.

Okay, but now you got this guy right there. That's the guy you want to now make the shortcut to. Alright, this goes to the actual database and you can come in here if you want to go to properties and just change the target right here to the ACCDE file, right? And then hit OK, and now you can use this and keep this for yourself. Don't ever get rid of this guy because you can't go backwards from that back to that. I mean, yes, there are companies out there that can reverse engineer it, but it's expensive and it's time-consuming and you don't want to have to go through that. So always make sure you keep a backup of your development ACCDB file.

Okay, but now if the user, let me close this, if the user does open this up, it's the ACCDE, it's locked down. And even if they do know that shift trick, I'm going to hold down shift and open it up. Okay, I'm in here. Yes, you can still see the tables, okay, but you can't come in here and go to design view and you can't see the design of any of your code. Right, right-click, design, it's just blocked out. All right, tables are not secured in Access at all. If you need your data to be secured, you need to use a database server like SQL Server. And yes, of course, I've got a course on that as well.

Alright, but now the user has a nice locked-down ACCDE file, and you can now give them this. Alright, the last thing on the checklist is to install the Access runtime. Now, obviously, if you're going to be installing it yourself, you can do it; no one's going to be the wiser. If your customer has to install it, well, they're going to see that, if the Access runtime. There's really no way around it, and they can also use the full version of Access if they have to. One of the nice things about the runtime is that they don't have to buy a copy of Office to use your database. The runtime is free. And again, of course, I've got a whole video on using the Access runtime, how to distribute your database for free using the Access runtime and there are some third-party package and distribution utilities out there. I haven't used any myself in probably 20 some years to be honest. I used to use InstallShield back in, like, the late '90s and early 2000s, but I haven't used it since then.

So, if you have an installer application that you recommend, let me know, post a comment down below in the comments because I've been looking for one. I've seen a couple out there, but I have no experience with them lately. But InstallShield used to work great because it would create distribution CDs for him over the CDs, uh... and you know that you just give to your customer it was all you know uh... completely uh... you could brand it with your own logo and um... anytime you made the database for a client, I just ran through the InstallShield caller and it made it seem to commit on the install and they had no idea it was using Access.

So, there are options out there, I don't know what they are today, I don't even know if InstallShield is still around. The people yeah, that looks like it from back in the day. This was great software back then, uh... looks like now it's been rebranded as Revenera. So if any of you guys have any experience with this, let me know, put a comment down below.

So, that's my entire checklist so far. I got a couple of other videos you can also use to give you some ideas for making like custom forms and stuff that makes your Access database not look like Access. I got this one on form design aesthetics where you can make your own custom controls and your own custom buttons and all kinds of cool stuff so it looks nothing like Access whatsoever. I'm not a graphic designer by the way. I just kind of threw these together in, like, Word and PowerPoint, but I mean, if you're good with that kind of stuff, you can make a lot better than that.

And I also did one on custom form background; stick a background behind it. If you want that old Windows 2000 look, they want to look like XP, you know, make it. Make your own custom form background. Make it look whatever you want it to look like. It'll not look like Access.

I'd also want to give a shout out to one of my moderators, Kevin Robertson. He came up with an idea. This is posted a couple of months back in my forums on the website. And what he's saying is you can use pop-up forms in your database, and you won't even see the Access window itself. It'll start up, and you'll just minimize it. So the Access window will be down in the taskbar, but all the user will see is going to be your pop-up form, like that. And here you can still see the Access logo, but I showed you how to change the logo so it'll look like your logo down there.

So to do this, what you'll do is we'll go to the original database. Now remember this opens up the ACCDE file now, so that's not even going to work. In fact, I'm going to get rid of it. There's no reason to keep that around. I'm going to just change this back to the DB. Properties, DB, DB. Okay.

So, open this guy up. Again, hold the Shift key down, open it up in developer mode. Come on. Here, little database. Okay, so what Kevin is saying to do is to take your objects, whatever objects you wanted the user to use, and make them pop-up. Right-click, Design View, go in here, and go Other, and set pop-up to Yes.

Now, I typically try not to use pop-up forms because they can sometimes unexpectedly show up in weird spots, and you have to kind of save it for like a standard monitor arrangement. Because if you've got multiple monitors they're going to go wherever you have them on your monitor. You might need to use code to move them around. I've got separate lessons on that too, but just be careful if you're using this.

So let's do the main menu. Let's do the customer form, Design View, pop-up, yes. Let's do the customer list form, Design View, pop-up, yes. And one more, let's do contacts.

And you'll have to do all of them in your database if you want them all to-- All right, pop-up, yes. So now those guys are pop-ups and then what we're going to do is in the main menu, we're going to minimize Access when it starts. So again, go into the main menu and see look at this, when you go into design view on pop-up menus that happens. Sammy, definitely put that on the list for the Access team. That's annoying, and that's been that way for years and years and years. Whenever you got a pop-up window, right, if you go to try to design it, boom, it shows up right up here in the corner, and that's annoying. Or hit that, kids. Then, that. Alright, you get it. Do that to get it back out. That's a cool fix, that anyway.

Alright, go back in here, go to that event, and go to the On Load that we have here. Okay, and that same spot where we're hiding the ribbon, we're going to say DoCmd.RunCommand, acCmdAppMinimize. That's going to minimize the application window, Access itself. All right, but your forms are pop-up forms, so they'll stay up. They're not going to minimize.

Okay, what you're also going to want to do is in the Form Close event for your main menu. You're going to want to shut the database down. Alright, so go to Form and find the Close event or Exit. Where's the close event? Where are you? Form Close--Right when they close this form, shut the database down. So DoCmd.Quit, and whatever, Save All is fine. Okay.

Alright. Debug compile'Make sure we don't have any errors. Close it. Close it. And there it is. Anyway, there we go. It's just the main menu. And yeah, you'll see the icons down on the bottom. There it is. There's the application window. But all they see is this. And you can click on stuff. If they do click on that, it will open up the application window behind it, but we've already hidden everything, so they'll just see this big empty screen. But now they can just work with the stuff, that's the customer form, right, contacts. Oh, what

TOPICS
Creating a seamless user experience in Access databases
Hiding the Access interface to deter naysayers
Using Visual Basic for Applications (VBA) to customize Access
Disabling the Access ribbon with VBA
Bypassing startup options using the shift key
Enabling and disabling shift bypass in Access
Compiling VBA code to eliminate syntax errors
Creating an ACCDE file (encrypted/execute only file)
Securing the database with ACCDE format
Converting an ACCDB file to an ACCDE file
Maintaining backups of the development database (ACCDB)
Limitations of design changes in ACCDE files
Using SQL Server for data security
Utilizing the Access runtime for distribution
Customizing the Access startup window and form properties
Managing pop-up forms in Access
Minimizing the Access application window with VBA
Shutting down the database with form close events

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Hide Access 2.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/21/2024 7:15:45 AM. PLT: 1s