jimmyspinner
New member
- Local time
- Today, 17:19
- Joined
- May 17, 2007
- Messages
- 8
Hi there,
I'm new to Union queries and this forum has been very useful in providing solutions up to now but I've hit a dead end having tried to search through the forum without posting a thread.
Here goes.....
I have built a union query based on two tables to link common fields as below to be in a list box.
SELECT Fame.PledgeDate, 'Fame.Company Name' AS [Company Name], 'Fame.Registered Number' as [Identifier], "Fame" as SourceTable
FROM Fame
where Fame.PledgeDate is not null and 'Fame.Registered Number' is not null
UNION SELECT Portfolio.PledgeDate, portfolio.cust_Name AS [Company Name], portfolio.CustomerID as [Identifier], "Portfolio" as SourceTable
FROM Portfolio
where Portfolio.PledgeDate is not null and portfolio.CustomerID is not null;
I've added the table name as the SourceTable into the list box so that once a double clicks on the record it would go to that record using the Identifier from the list box.
Any ideas????
Cheers
Dave aka jimmyspinner
I'm new to Union queries and this forum has been very useful in providing solutions up to now but I've hit a dead end having tried to search through the forum without posting a thread.
Here goes.....
I have built a union query based on two tables to link common fields as below to be in a list box.
SELECT Fame.PledgeDate, 'Fame.Company Name' AS [Company Name], 'Fame.Registered Number' as [Identifier], "Fame" as SourceTable
FROM Fame
where Fame.PledgeDate is not null and 'Fame.Registered Number' is not null
UNION SELECT Portfolio.PledgeDate, portfolio.cust_Name AS [Company Name], portfolio.CustomerID as [Identifier], "Portfolio" as SourceTable
FROM Portfolio
where Portfolio.PledgeDate is not null and portfolio.CustomerID is not null;
I've added the table name as the SourceTable into the list box so that once a double clicks on the record it would go to that record using the Identifier from the list box.
Any ideas????
Cheers
Dave aka jimmyspinner