@@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.
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
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.
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!
@@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.
@@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.
FYI, any created querydef object (with a non-zero length name) is automatically appended to the querydefs collection.
Thanks for sharing!
@@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.
I use QueryDefs to run SQL statements so that my database users can export from Excel by filtering dropdowns on forms
Cool technique!
Anyway you could post a sample ACCDB file to demonstrate this?
@@RungeCarl Now posted on mackenziemackenzie.com/downloads
excellent Sir
Many many thanks!
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
@@mahmoudbarrawi7092 Very much appreciated. I'm glad you find it useful!
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.
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!
@@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.
@@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.