Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to IsDev Function    Comments List
Pinned    Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Transcript
Richard Rost 
          
2 years ago
Today's video is just a quick tip. I'm going to share something one of my students shared with me. He's found a quick way to determine whether you're in developer mode. In other words, are you the developer working with the ACCDB file, or is it one of your users using an ACCDE file, which is what all your users should have, right? I'll talk about this in a moment.

Recently, in one of my videos, the "Force Shutdown" video, I showed you how to force the database to close down so you can, for example, set it to automatically close at 5 AM every day, just in case someone left the office without logging off. However, you might not want to be logged out yourself; you might want to ensure that only the developer, or the admin, doesn't get booted out.

I've demonstrated several techniques for setting up user logins, security, and more. But one of my students, Thomas, came up with an ingenious method to determine whether you're working with the ACCDB file or not. In other words, if one of your users has an ACCDE file, right? He set the temp variable like this. I'm going to show you how to build a simple function to do this, but it's essentially the same technique, so a big shoutout to Thomas for the idea.

Before we dive into it, though, let's clarify: this is a developer-level video. What does that mean? Well, if you've never programmed in VBA before, I highly recommend watching this video first. There's a little QR code you can scan right there; it teaches you everything you need to know to get started in about 20 minutes. Also, watch this video on creating your own function, this video on the "if then" function, and this video on what an ACCDE file is if you've never split your database before. Oh, wait, I've got a video for that too. Here's my "Split Your Database" tutorial. Of course, you should always split your database in a multi-user setup. Don't have multiple people working on the same front end. Every user gets their own copy of the back end file, which is just a copy of your ACCDE file.

So, here I have the master database, my ACCDB file, the one I work on to make changes. Then, just a copy of my tech help free template, this free database you get when you want to... Let's make a function to indicate whether or not I am working with an ACCDB file. How can we do that? We're going to check the file name.

This file's name is going to be a full path, like "C:\whatever\my desktop\db.accdb". We can get that from the current project group of properties. So, let's go down here to Global Module. If you don't have a Global Module set up already, just go to Create, and then Module (not Class Module, Regular Module). That'll open up the VB Editor. There it is. Every... Come right down here, and we're going to create a public function.

We'll call it "IsDev", nice and short. It's not going to take any information in, so no incoming parameters, and it's going to return a Boolean value (Bool). Boolean is a true/false value, otherwise known as a yes/no field in Access. Now, all we're going to do is check the right five characters of the full path and file name.

If that comes out as ACCDB, then we know we've got the developer copy. So, if the right of current project.full name, comma five, equals ACCDB, then IsDev equals True; otherwise, IsDev equals False. Real straightforward, right? It's either that or it's not. Alright, let's save that, give it a debug compile.

Looks good. Now, let's test it. So, I'm just going to put some code in my Hello World button. Design view, right-click, build event, and we can come in here and say if IsDev, then (we don't need to put "= True", right?). By default, equals true is what we're looking for. Then we're going to status "is developer". Otherwise, we'll status "is not developer". Alright, and status is my little status function. That's way up top here; I covered this in the tech help free template video. It just basically writes to that big gray box on the main menu.

Okay, save it again, debug compile. Let's go back out here, let's close it, open it back up again, click the button, and now I am in developer mode, right? That way, the database knows it's the developer's time. Now, let's make the ACCDE file. If we were to actually split the database, where you put your tables in one thing and your forms and stuff in another, you would split it and you'd give the front end ACCDE file to your users. That's all explained in those other videos. But for now, we'll just make an ACCDE out of the whole thing, alright?

So, file, Save As, ACCDE, right there, Save As. Alright, what are you going to call it? ACCDE is fine. And then hit save. And it'll do some stuff. And then you'll end up with this little guy. It's an ACCDE file, right?

It's the execute-only or encrypted. I've seen different definitions for it. But now if you come in here and click the button, not in developer mode because this is the ACCDE file. It's literally just looking at the file name. Now, why would you need this? Well, if you don't have full user security in your database with user logons, or you don't want to go through the trouble of checking the PC name, which I also talk about in my other video, you can look at the name of the computer, the name of the logged-on user, there's all kinds of things you can do. But if you don't want to do any of that, and you just care about whether or not it's you or one of your end-users, then this technique is nice and short and simple.

But I would only use this for maybe displaying some extra diagnostic information, or if you want to have a developer menu that's got buttons on it for routine maintenance type stuff, like backups, compact, and repair, extra diagnostic logging, that kind of stuff. Don't put anything secure in here, because this is not a secure method. This is just a quick method to maybe hide some stuff that you don't want your end-user seeing, but it's not a big deal if they do see it because this is how easy this is to break. You can just come in here and rename this front-end file. If I call it, let's say, db2.accdb, right, hit enter, you get the, you're going to change file extension, yeah, that's okay. And so now I've got db2.accdb and if I open this one up and I hit Hello World, it is developer now. Even though it's still an ACCDE file, in other words, if I come in here, I still can't go into design view, right

? It's still, the file's still locked down. Still can't open up the VBA and stuff like that. But your end-user, if they know enough, can still rename the file. So don't rely on this technique for anything sensitive, right? If you do want more in-depth security I got a couple of free videos. I cover user-level security, actually setting up usernames and passwords. Not that hard to do but it takes a little bit of work. I also have another video here that walks you through some simple security measures to protect your database from 90% of users out there. You know if unless they're a hacker unless they know access well. If it's just your typical office user this stuff is good enough. And once you got that stuff set up you can track the user logon you can track what they're doing inside your database to this technique here I just use the computer name and the person's username on windows so you don't have to set up a logon password if you want to just have them

so it just recognizes their computer now by its very nature access itself is not designed to be a secure database if you really really need security you want to take your back-end data, your tables and stuff, you want to put those in a database server like SQL Server. Okay, but I have my security seminar which teaches you how you can make your access database as secure as possible. Okay, and we can take your front end, we can lock it down, we can prevent your users from getting into stuff that you don't want them to see, and we create a system log, all that kind of stuff.

So check this out if you really want to make a secure solution. And again, if you move your data to SQL Server, then you've got a really good bulletproof tight database set up. My SQL Server online seminar shows you how you can set it up so that you can share it with people around the world too. So anybody anywhere with a copy of your Access Front End can log into your database and you can get information to a webpage or any kind of other stuff that you want. And of course, if you like learning with me, if you enjoy my wacky sense of humor and like my videos, check out my developer courses. I got lots of them. Lots of stuff to keep you busy learning Microsoft Access. So there you go. There is your tech help video for today. Again, shout out to Thomas. Thanks for the idea for the video. I hope the rest of you learn something. Live long and prosper my friends. I'll see you next time.
Sami Shamma  @Reply  
             
2 years ago
Hi Richard
Am I missing something? Is there a reason you are posting this transcript?
Richard Rost OP  @Reply  
          
2 years ago
It's something I do once in awhile, and I really would like to be more thorough with posting these. But I'm doing it to hopefully help improve Google search results by putting the text keywords on a page that's at least adjacent to the video itself. I don't really have any data yet as to whether or not this is helping search placement, but I use a software tool to generate the transcript based on the video. Then, I run it quickly through chat GPT to correct the spelling and grammar. And I figure, since I have it, I might as well post it here. It's the same technique that I use for the handbook generator.
Sami Shamma  @Reply  
             
2 years ago
Makes sense

This thread is now CLOSED. If you wish to comment, start a NEW discussion in IsDev Function.
 

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 11:10:46 AM. PLT: 1s