Solved

Creating forms in vba

Posted on 2014-09-10
4
146 Views
Last Modified: 2014-09-10
I have a number of queries that are created dynamically based on client/model. i can  create lists of those no problem. What I am unsure of is how to create the subforms and get them onto a master form.

so for example:

Access has done its work and created two queries:
QryAbi3Series
QryCap3Series

so I want to align the two (in this case) subforms next to each other on the master form.

That bit I am struggling to implement is if i had two sets of models (or more):
QryAbi3Series
QryCap3Series      for info these show all bmw 3 series models for these two clients

QryAbiCClass
QryCapCClass          for info these show all mercedes CClass models for these two clients


I would need a combo on the master form that would then allow me to choose which model set.


not sure how to inplement that.

I am in vba
0
Comment
Question by:PeterBaileyUk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 57
ID: 40314122
The usual approach is to do a subform for each and keep them hiidden.

Then, based on the combo selection, make the appropriate one(s) visible.

Jim.
0
 

Author Comment

by:PeterBaileyUk
ID: 40314140
will it matter that the recordsource in this case the queries being dynamically created will effectively change their name whilst processing?
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 40314160
I'm not quite sure I follow.   Let me make a few comments and see if it makes it clearer:

When working with subforms:

1. You can change the recordsource.  This is typically done when you have identical tables, and want to switch between them keeping the same controls.

2. You use multiple subforms and hide/unhide as needed.   You do this when the controls/layout needs to change.  

3. You can within a single subform, change the recordsource and hide / unhide controls to handle cases where the controls/layout need to change (like #2), but in general it's far easier to simply use multiple subforms.

 Not sure if that helps or not...

Jim.
0
 

Author Comment

by:PeterBaileyUk
ID: 40314167
ok i will experiment around that advice
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question