Union Query Select

W

Warrio

Hi, I want to do a Union query in which there would be a condition.


Ex:

Select Debit.Référence as Réf
From Debit
Where (((Debit.Référence) Like "*" & [Forms]![Motor]![Text0] & "*"))
Union
Select Credit.Référence as Réf
From Credit
Where (((Credit.Référence) Like "*" & [Forms]![Motor]![Text0] & "*"));

It tells me the following Error

Cannot use Memo, OLE, Hyperlink Object field 'Référence' in the SELECT
clause of a union Query.

When I take of the Union with Crédit it works.

Is there a way to do this Union with the condition?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Union Query problem 1
Union Query 2
pass paramter to union query using VBA code 2
Union Query Format 6
Union Query help 7
Union Query Where Clause 0
Union Query and Field Alias 7
MS 2003 Parameterized Query 0

Top