I've write this query in an access 2007 database:
SELECT Ordini.ID, Ordini.Data, Clienti.Cognome, Clienti.Nome, DettagliOrdine.IDProdotto, Prodotti.Descrizione, Prodotti.Prezzo, DettagliOrdine.Quantità, ([Prezzo]*[Quantità]) AS Totale, Ordini.Note, Produttori.Nome, Ordini.Ordinato, Ordini.Arrivato, Ordini.Ritirato
FROM Produttori INNER JOIN (Prodotti INNER JOIN ((Clienti INNER JOIN Ordini ON Clienti.ID = Ordini.IDCliente) INNER JOIN DettagliOrdine ON Ordini.ID = DettagliOrdine.IDOrdine) ON Prodotti.ID = DettagliOrdine.IDProdotto) ON Produttori.ID = Prodotti.IDFornitore
WHERE (((Clienti.Cognome)=[Cognome: ]) AND ((Clienti.Nome)=[Nome: ]) AND (([Cognome: ]) Is Not Null))ORDER BY Ordini.Data;
This query brings up an input box for the COGNOME and NOME field of research.
I need that if user write nothing (press ENTER) for that field research tag is . (all value of that field).
es. If user write a COGNOME but not a NOME (press ENTER when popup NOME window) research to be done on all the NOME with that "COGNOME".
How can I do this?