Re: Same Columns Different Queries

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I came up with this which I think is in the right direction but it still
doesn't return data.

With Me.ListAccounts
.RowSource = "SELECT tblPayName.PayNameID, tblPayName.PayName,
tblPayName.PayAppliedCOA " & _
"FROM tblPayName " & _
"ORDER BY tblPayName.PayName UNION " & _
"SELECT tblPayTypes.PayTypeID, tblPayTypes.PayTypeName,
tblPayTypes.PayTypeCOA " & _
"FROM tblPayTypes " & _
"ORDER BY tblPayTypes.PayTypeName;"
.ColumnCount = 3
.ColumnWidths = "0in;2 in;.5 in"
.Requery
End With

Thanks
DS
"DS" <bootybox@xxxxxxxxxxxxx> wrote in message
news:zWIVh.604$ru1.465@xxxxxxxxxxxxxxx
I have 2 different queries that I need to combine (perhaps) into one. The
problem is I need to have the data go to the same columns. Such as...

ID Name Account Number

Query 1
ID
Name
Account

Query 2
ID
Name
Account

As you can see they both have the same field names but different info.
Any help is appreciated.
Thanks
DS



.