• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

MSaccess RELATIONSHIP view of an mdb created by vc++

Hello,

I have a VC++ program to create (from scratch !) a MDB with several tables as well as some 1:n relations between them. It works fine.
When I close the vc++ program and look at the mdb file (by opening MS Access, then click on RELATIONSHIP icon), then I get a graphical overview of the database. The bug is: some tables are displayed, others are NOT displayed. I want full control of which table to display and which not. Now it seems random. So :
1.) what is the command to tell to dao: "display table XY on pressing <Relationship> in MS Access" ?
2.) Can I also control the layout of the different tables (where are they positioned inside the relationship display) ?

I am NOT interested in any solutions inside  MS Access, I want the problem to be solved in my vc++ program, at the moment of the creation of the MDB.

Sonja

0
Sonja_M
Asked:
Sonja_M
  • 5
  • 4
  • 3
  • +1
5 Solutions
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You have basically posted the same question again.  Please delete one or the other.

mx
0
 
Sonja_MAuthor Commented:
theother is deleted.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
No, you cannot manipulate the relationships window, and it's somewhat buggy at best. Tables sometimes display and other times do not.

The diagram is simply a graphical representation of the relationships, but it has nothing to do with the actual relationships.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
0
 
Sonja_MAuthor Commented:
Hello LSMConsulting,

thanks a lot for your answer !
> Tables sometimes display and other times do not.
my impression is different: I have 32 tables, and my impression is: always the SAME 15 tables get displayed, after closing my vc++ program and opening ms access. It seems to not depend on whether I create the MDB from scratch or whether I change some records in the mdb, using my vc++ program.

> The diagram is simply a graphical representation of the relationships,
I understand, and this is perfect.

> but it has nothing to do with the actual relationships.
this I do not understand. Can you explain in other words ?

best regards, Sonja

0
 
TextReportCommented:
The Relationship window is a graphical representation held for each ACCESS user, the default user being admin. This could be the reason you beleive that the views are random, you could be looking at it from different users.

There is NO automation of the graphical representation, however, you can program the relationships themselves. Try adding All Tables and save. When you close the Relationship window you should get an option to save it.

Cheers, Andrew
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"Try adding All Tables and save. When you close the Relationship window you should get an option to save it."

TR ... see this same Q link http://www.experts-exchange.com/Programming/Languages/CPP/Q_23115129.html

I already mentioned that ...and she "is not interested in that solution"

mx
0
 
Sonja_MAuthor Commented:
Hello Andrew,


> The Relationship window is a graphical representation held for each ACCESS user, the default user being admin.
interesting ! In my case, however, the PC is not in a network, and I am logged in as admin.

> This could be the reason you beleive that the views are random, you could be looking at it from different users.
it is random in the sense of: I do not see the logic behind how tables are selected to be shown. But it is constant / predictable in the sense of: there are always the same tables missing & the same tables displayed.

> There is NO automation of the graphical representation, however, you can program the relationships themselves.
yes, I have already done this, in vc++.

> Try adding All Tables and save. When you close the Relationship window you should get an option to save it.
this is a solution inside MS Access :-(


Thanks for your interesting thoughts. Sonja
0
 
TextReportCommented:
MX this is http://www.experts-exchange.com/Programming/Languages/CPP/Q_23115129.html
perhaps you mean "VC++/DAO creates MDB, but MSAccess does not show all tables." http://www.experts-exchange.com/Microsoft/Development/.NET/Visual_CPP/Q_23114990.html.

Either way it is not possible to code and atleast a consistant message is being presented.

Cheers and best wishes, Andrew
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"But it is constant / predictable in the sense of: there are always the same tables missing & the same tables displayed."

Note that *only* tables that have relationships established between them are going to show in the Relationship window.  I asked this question before:  Do you have relationships defined between ALL of the tables?  Or just between the 15 that are showing ?  Of course, form within Access, you and drag on or add a table to the diagram, whether or not it's in a relationship. But opening the window from VC++ (or doing the Show All from Access) is only going to show tables in a relationship.

mx
0
 
TextReportCommented:
Hi sonja

"there are always the same tables missing & the same tables displayed." means that is was saved with these tables against your admin user in the MDB.

When you are creating the MDB from scratch is it a CreateDatabase command that you are executing or could it be copying an MDB as a template?

Cheers, Andrew
0
 
Sonja_MAuthor Commented:
actually, mx has found the solution, but only thanks to the good answers of all other experts. My warmest thanks and best wishes go to  Andrew, TextReport and LSMConsulting. - Sonja
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
So, what was ... the solution ??  What did I find ?

mx
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now