problems with two tables (cut down)

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hello I am creating a search page for two sets of similar
data (when I say similar I actually mean for two sets of
diffrent bases. So I would like to be able to search by
both of them on the one form as its the same information.

When I try to get a query together that shows all the
Information it seems to show the data about 20 or so times
for each record.

Does anyone know how I can solve this?

Many Thanks

James
 
You have not supplied enough information for an exact cause, but I think you
have a Cross Product. Post your SQL and table structures for a better
guesstimate.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Ok then heres how its all setup....

I have one table which for teh purpose of this we will
call table 1. In table one there are the following fields:

Name
Base
Id
Password

In the second table we will call this one table 2 just to
keep it simple :) in this table I have the following
fields:

Forname
Surname
Location
Base
Id
Password

I cannot get them to come together as one query. How can I
possibly do this?

I would like them to go together so I can join both sets
of information into the one form so I can serch by both
sets of data.

Is this possible? If so how can I achieve it?

Many Thanks

James
 
Create a relationship between 2 fields on these Tables
which I believe is the ID field as Primary key and Foreing
Key.
 
This I have tried but for some reason it only shows me 23
of the records from each table. It is just totally
annoying... Sorry. Thanks for the advice but its been
tried unfortunatly. Do you have any more suggestions?

Or would it be easier to E-Mail you the database?

Thanks for the assistance.

Many Thanks

James
 
This works to an extent its just that in one table I have
more records than in the other and it finishes all the
records in one table but then it stops the other records.

Ok I will try to explain a little better

Table 1 has 123 records lets say and table 2 has 64 records

When I run the query it will bring up all the records in
table 2 and all the records up to number 64 in table 1 but
will not see the other records.

Is there any other way to overcome this?

Many Thanks

James
 
Unfortunatly this did not work would you like to have a
look at the database or do you have any more ideas?

Many Thanks

James
 
I think the answer is UNION query.

Select Name, Base, ID, "", Password from table1
UNION
Select Forname & " "& Surname, Base, ID, Location, password

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top