No video

How to Create and Modify QueryDefs Programmatically in your MS Access Database

  Рет қаралды 4,661

Sean MacKenzie Data Engineering

Sean MacKenzie Data Engineering

Күн бұрын

In this episode, we'll look at how to programmatically create and modify query definitions in Microsoft Access. Being able to create and (especially) modify QueryDefs in MS Access is a nice trick that makes the coding of your application easier, and more flexible. Sometimes it is just easier and faster to change a QueryDef on the fly in your code, so that your users have a better experience in your app.
Interested in transforming your career or finding your next gig?
system.billzon...
Want my team to do a project for you? Let's get to it!
system.billzon...
Want to get access to premium content made just for you and have a chat with me? Find me on Patreon :
/ mackenziedataengineering
Demo of my BZ RDP Cloaker:
www.patreon.co...
Contact form you can find at www.mackenziema...
Follow me on social media:
/ mackenziedataanalytics
/ 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....
#msaccess #vba

Пікірлер: 15
@zoomingby
@zoomingby 8 ай бұрын
FYI, any created querydef object (with a non-zero length name) is automatically appended to the querydefs collection.
@seanmackenziedataengineering
@seanmackenziedataengineering 8 ай бұрын
Thanks for sharing!
@zoomingby
@zoomingby 8 ай бұрын
@@seanmackenziedataengineering Quite welcome :) Lol, 1 down 1000 bits of information to make it an even exchange. Thanks for all you do. You've helped me immeasurably over the years.
@DataisKing
@DataisKing 2 жыл бұрын
I use QueryDefs to run SQL statements so that my database users can export from Excel by filtering dropdowns on forms
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Cool technique!
@RungeCarl
@RungeCarl 2 жыл бұрын
Anyway you could post a sample ACCDB file to demonstrate this?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
@@RungeCarl Now posted on mackenziemackenzie.com/downloads
@mahmoudbarrawi7092
@mahmoudbarrawi7092 2 жыл бұрын
excellent Sir
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Many many thanks!
@mahmoudbarrawi7092
@mahmoudbarrawi7092 2 жыл бұрын
When I watch the program, I feel that you are capable because your style is easy and abstaining, and I learned a lot from you, and I follow all your series, and finally to you from God all the reward and from those who watch all the appreciation, admiration and gratitude
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
@@mahmoudbarrawi7092 Very much appreciated. I'm glad you find it useful!
@vladoz9299
@vladoz9299 Жыл бұрын
Do you have a video where the table name changes in a query definition? Say, the same query is used each year, but the table name contains the current year in its name.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Good question - this is very possible and in fact, I use this strategy in some situations. You can simply change the entire SQL for the query to use your new table using the methods in this video!
@vladoz9299
@vladoz9299 Жыл бұрын
@@seanmackenziedataengineering Yes but then I need to do string manipulation and not use the DAO engine to do it auto. more simply? We have many queries that generate a custom built tables row by row. Each of the queries need the new table name each year.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
@@vladoz9299 When you set the SQL for a querydef, it is a DAO querydef, so you are using DAO for the query. Maybe as an alternative, you could just generate a new querydef each time, but this will create many objects. If the data is uniform, you could try putting it all into one big table with an extra column for "query name" or something like that. Then, just select the query/report name from a drop-down and it will filter using a single query.
How to Use Data Macros to Track Changes to Field Entries in MS Access
9:00
Sean MacKenzie Data Engineering
Рет қаралды 7 М.
How I Reacted When I First Converted a MS Access App to Use a SQL Server Backend
13:09
Sean MacKenzie Data Engineering
Рет қаралды 4,7 М.
English or Spanish 🤣
00:16
GL Show
Рет қаралды 7 МЛН
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 33 МЛН
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН
How to use Microsoft Access - Beginner Tutorial
31:07
Kevin Stratvert
Рет қаралды 3,1 МЛН
How to Use a Pass Through Query in MS Access - SQL Server Example
18:34
Sean MacKenzie Data Engineering
Рет қаралды 17 М.
How to Use DLookup in Microsoft Access
15:48
Sean MacKenzie Data Engineering
Рет қаралды 19 М.
Access - Visualize Query Results from VBA
10:29
codekabinett.com/en
Рет қаралды 15 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 354 М.
English or Spanish 🤣
00:16
GL Show
Рет қаралды 7 МЛН