No video

How to Run Code as Your MS Access Form Opens - On Open, On Load, and On Current

  Рет қаралды 5,607

Sean MacKenzie Data Engineering

Sean MacKenzie Data Engineering

Күн бұрын

Being able to run some code as a form opens is a critical tool if you’re going to create apps in Microsoft Access. Luckily, there are three events that are commonly used to handle this scenario. These events are On Open, On Load, and On Current (aka. Form_Open, Form_Load, and Form_Current in VBA). By using these events, you will unlock great flexibility in creating your applications. Join me as I demonstrate how to use these tools!
Related Videos:
How to Make a Search Form with Combo Boxes in MS Access
• How to Make a Search F...
How to Make Cascading Combo Boxes in MS Access
• How to Make Cascading ...
Bound vs. Unbound Forms and Controls in Microsoft Access
• Bound vs. Unbound Form...
How to Make a Listbox in MS Access Part 2: Multi-select
• How to Make a Listbox ...
How to Create In and Out Listboxes in Microsoft Access
• How to Create In and O...
How to Make a Multi-Term Search Form and Report in MS Access
• How to Make a Multi-Te...
How to Use Timers to Run Actions or Code on an Interval in Microsoft Access
• How to Use Timers to R...
How to Use Before Update in Microsoft Access
• How to Use Before Upda...
How to Make Changes to Text in a Textbox in Microsoft Access Using SelStart and SelText
• How to Make Changes to...
How to Add Combo Box Rows On-The-Fly in MS Access
• How to Add Combo Box R...
How to Run Code as Your MS Access Form Opens - On Open, On Load, and On Current
You are watching this video now!
How to Use On Close and On Unload with Microsoft Access Forms
• How to Use On Close an...
Want to get access to premium content made just for you and have a chat with me? Find me on Patreon :
/ mackenziedata. .
Want to work with me 1:1? Contact me today and book your free 20 min consultation!
Contact form you can find at www.mackenziema...
Follow me on social media:
/ mackenziedat. .
/ seamacke
/ seamacke
/ seamacke
/ psmackenzie
Get Microsoft Office including Access:
click.linksyne...
Got a KZbin Channel? I use TubeBuddy, it is awesome. Give it a try:
www.tubebuddy....
#VBA #MSAccess
• How to Use DateAdd, Da...

Пікірлер: 17
@edwardkinney968
@edwardkinney968 Жыл бұрын
I am getting a lot of good information from your videos, Thanks. Have you ever set different control properties on a form on different records? Based on your video it must use the On Current event. I can't seem to figure it out.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
You bet! You can use On Current as you see in this video. One way you can do it is to use If.. Then.. End If to change your control properties based on values in your fields. ie. Something like: If Me!txtPartType = "Axle" Then Me!txtAutoSet.Visible = False Me!cboAxleSize.BackColor = vbRed End If
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
It's very interesting and helping
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Glad it was helpful!
@henrysen-opoku1090
@henrysen-opoku1090 2 жыл бұрын
Hello Sean, on a form with several combo boxes for filter; how do we load the form without its visible row before we start to filter. Thank you for your invaluable assistance.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
One trick is to set the DataSource of the form to something like: Select * From MyTable Where ID = 0; So, the initial load is empty but then has entries when you proceed to filter.
@larrywelch9359
@larrywelch9359 2 жыл бұрын
Do you have or know of any available course that I might purchase pertaining to: MS Access, VBA Code, creating a function that will set the ActiveForm and ActiveControl (of function) that can be used on the current open form. Thanks in advance
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Not that I know of.. this is a good idea for a video though! Thanks!
@weirdfun1441
@weirdfun1441 10 ай бұрын
What is ON Dirty event?
@seanmackenziedataengineering
@seanmackenziedataengineering 10 ай бұрын
When you have a bound form, for example, an employee form. When you start typing into text or selecting values in bound controls, but the record has not been saved yet, the form becomes Dirty. OnDirty is an event that you can put some code in when the form becomes dirty. Somebody starts typing into a text box will trigger the event. Good idea for a video 🛠
@jot2243
@jot2243 Жыл бұрын
Hi Sean. I was trying to change the form to launch my MS-Access to a particular form (In the Access option, Current Database Tab) but each time and I did that, I got this warning message "The value of a Display Form property was invalid and was not saved" and it returns the value to none even though I have done it countless times before now. It won't change even if I open it again and change it to the form I want. I need your help to resolve this issue as I am stuck. Thanks
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
You probably need to open your database in exclusive mode. Someone (even you perhaps) may have another database lock open on the file. Open Access > Open > Browse > in the dropdown next to Open, choose Open Exclusive If you can't, you may need to ask others to close the file or restart your machine to remove the lock.
@dbdata9836
@dbdata9836 3 жыл бұрын
thanks
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
You're welcome! Glad you enjoyed it.
How to Add Combo Box Rows On-The-Fly in MS Access
13:05
Sean MacKenzie Data Engineering
Рет қаралды 2,2 М.
How to Make Cascading Combo Boxes in MS Access
16:08
Sean MacKenzie Data Engineering
Рет қаралды 31 М.
Чёрная ДЫРА 🕳️ | WICSUR #shorts
00:49
Бискас
Рет қаралды 6 МЛН
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 6 МЛН
A Better Solution Than the On Filter Event in Microsoft Access Forms
29:42
Computer Learning Zone
Рет қаралды 5 М.
Getting Started with MS Access Visual Basic for Applications - VBA Code-Behind and Modules
32:06
How to Determine if a Form is Loaded (Open) in Microsoft Access
16:51
Computer Learning Zone
Рет қаралды 3,2 М.
How to Make a Multi-Term Search Form and Report in MS Access
38:16
Sean MacKenzie Data Engineering
Рет қаралды 10 М.
How to Launch and Filter Reports Using a Form in MS Access
24:32
Sean MacKenzie Data Engineering
Рет қаралды 26 М.
How to Set Basic Startup Options on Your Microsoft Access Database
13:19
Sean MacKenzie Data Engineering
Рет қаралды 4,9 М.
How to Use DLookup in Microsoft Access
15:48
Sean MacKenzie Data Engineering
Рет қаралды 19 М.
how to run Access form Automatically as Full Screen | Very Simple Methods.
9:47
Jamal Programming Tips
Рет қаралды 28 М.
Чёрная ДЫРА 🕳️ | WICSUR #shorts
00:49
Бискас
Рет қаралды 6 МЛН