Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem linking 2 MSAccess database tables

Status
Not open for further replies.

lesp1

Technical User
Feb 18, 2002
15
0
0
GB
I have two Access databases. In order to link the two tables I need it is necessary to join on three columns/fields. The three fields are jointly Indexed in the relevant tables. When I link in Crystal, clear the smart links and then manually link on all three fields and preview the report it appears to only link on the first field, i.e. I have duplicate records generated. I appear to get the same result by just linking on that one field.
Anyone got any ideas how to overcome?
Not sure if this is something set up on my system but I cannot use the show SQL menu option (greyed out) so cannot check that out to see if that explains anything.
One other thing, the main linking field has a different length in each database table. Could this be affecting the link?


Regards

Les
 
The different lemgth is most likely the culprit here.

Typically the reason you cannot access 'show SQL' is because you are natively connected to the .mbd file rather than using a ODBC DSN to connect. If you do not have one set up you will have to create on in Control Panel.

Let me know if you have any questions.

Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
As dgillz mentioned, using an ODBC would resolve, though you will enjoy better performance by creating a Query in one of the MS Access databases that links the local table to the other database table and then using that Query in CR.

-k kai@informeddatadecisions.com
 
Many thanks for responses. The way I have overcome now is to create a field that is a combination of the others in both of the source tables.
Reasons being: Changing the field length of the main field still didn't seem to solve the problem.
I tried creating a query in one of the MSAccess databases, but because of the absence of matching records in one table, and problems with multiple outer joins the query would not pick up all the records I needed.

Cheers

Les
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top