SlimJimPoisson
New member
- Local time
- Today, 15:40
- Joined
- Mar 30, 2018
- Messages
- 6
I have an Access application with primarily one table. I am always creating new queries to look at my data. Not only do these queries return different records they also present different columns, in different orders. All of these queries will include the unique ID field so that common operations can be performed on them, but the formats and filters are completely different.
I envision an architecture where there is really one main form that acts as a control wrapper around a continuous subform. The wrapper has the buttons and functions (such as right-click menu) that all me to filter and massage the records being currently displayed. I have already completed most of that.
One of the wrapper's features would be to allow the user to choose the datasheet being presented in the subform. When choosing a new view it will either use an existing query or its equivalent SQL to generate the dataset being displayed.
I have this working more or less, but it is not dynamic enough. It's easy to filter and sort the data, but I cannot determine how to rearrange the columns since that order seems to be dictated by the subform that uses the query.
So, I want to do this and avoid having to create an associated subform every time I create a new query. I already have the code to find the queries and pull their SQL, I just need to know how hard it will be to have the one main form and one subform perform the magic needed to satisfy my need which includes rearranging the columns.
I have some ideas on how I would approach this. I was pretty successful foregoing the form and subform altogether and just hijacking the RightClick popup CommandBar so that you can perform operations directly on a query's datasheet, but I ran into some bizarre problems (another question for another thread).
However, before I went any further I wanted to get a sanity check on my understanding and vision. Outside of my introduction this is my first post. I hope I don't come off as the addled old professor you find wandering the chemistry building late at night looking around and muttering to himself. It is very possible that I missed something gigantic in my confusion. Like I'm in the wrong building. Or it's Sunday.
I envision an architecture where there is really one main form that acts as a control wrapper around a continuous subform. The wrapper has the buttons and functions (such as right-click menu) that all me to filter and massage the records being currently displayed. I have already completed most of that.
One of the wrapper's features would be to allow the user to choose the datasheet being presented in the subform. When choosing a new view it will either use an existing query or its equivalent SQL to generate the dataset being displayed.
I have this working more or less, but it is not dynamic enough. It's easy to filter and sort the data, but I cannot determine how to rearrange the columns since that order seems to be dictated by the subform that uses the query.
So, I want to do this and avoid having to create an associated subform every time I create a new query. I already have the code to find the queries and pull their SQL, I just need to know how hard it will be to have the one main form and one subform perform the magic needed to satisfy my need which includes rearranging the columns.
I have some ideas on how I would approach this. I was pretty successful foregoing the form and subform altogether and just hijacking the RightClick popup CommandBar so that you can perform operations directly on a query's datasheet, but I ran into some bizarre problems (another question for another thread).
However, before I went any further I wanted to get a sanity check on my understanding and vision. Outside of my introduction this is my first post. I hope I don't come off as the addled old professor you find wandering the chemistry building late at night looking around and muttering to himself. It is very possible that I missed something gigantic in my confusion. Like I'm in the wrong building. Or it's Sunday.