hi
have a form (a continuos one) that has this recordsource
Code:
SELECT [LK contatti_messaggi TOT UNICI LOCALE].ID, [LK contatti_messaggi TOT UNICI LOCALE].[Nome cognome], [LK contatti_messaggi TOT UNICI LOCALE].[SENDER PROFILE URL], [LK contatti_messaggi TOT UNICI LOCALE].[CONVERSATION ID], [LK contatti_messaggi TOT UNICI LOCALE].Position, [LK contatti_messaggi TOT UNICI LOCALE].Company, Comuni.Comune, Mercato.Mercato, Settore.Settore, [LK contatti_messaggi TOT UNICI LOCALE].Contratto, [LK contatti_messaggi TOT UNICI LOCALE].[Connesso il], [LK contatti_messaggi TOT UNICI LOCALE].[Connesso Il_2], [LK contatti_messaggi TOT UNICI LOCALE].[Data Invio], [LK contatti_messaggi TOT UNICI LOCALE].SUBJECT, [LK contatti_messaggi TOT UNICI LOCALE].CONTENT, [LK contatti_messaggi TOT UNICI LOCALE].FOLDER, [LK contatti_messaggi TOT UNICI LOCALE].[Da contattare il], [LK contatti_messaggi TOT UNICI LOCALE].[Non interessante], [LK contatti_messaggi TOT UNICI LOCALE].[In db], [LK contatti_messaggi TOT UNICI LOCALE].[Last name]
FROM Mercato RIGHT JOIN (Settore RIGHT JOIN (Comuni RIGHT JOIN [LK contatti_messaggi TOT UNICI LOCALE] ON Comuni.IDComune = [LK contatti_messaggi TOT UNICI LOCALE].CittàID) ON Settore.ID = [LK contatti_messaggi TOT UNICI LOCALE].Settore) ON Mercato.ID = [LK contatti_messaggi TOT UNICI LOCALE].Mercato;
i use another form to filter the first form, i have some comboxes that allow me to select the field i want to filter, and another combobox that gets every value in that field.
to get every value from a specific field i extract the piece of recordsource after "FROM", and before i put "SELECT DISTINCT" & FIELDNAME; until it is a field not calculated with other tables it is ok, but i've got problems with "mercato" and "settore" that in the "lk contatti_messaggi totali" are numeric values and i get the real value from "mercato" table and "settore" table.
the rowsource is :
Code:
SELECT DISTINCT Mercato FROM Mercato RIGHT JOIN (Settore RIGHT JOIN (Comuni RIGHT JOIN [LK contatti_messaggi TOT UNICI LOCALE] ON Comuni.IDComune = [LK contatti_messaggi TOT UNICI LOCALE].CittàID) ON Settore.ID = [LK contatti_messaggi TOT UNICI LOCALE].Settore) ON Mercato.ID = [LK contatti_messaggi TOT UNICI LOCALE].Mercato;
i get the error "the specific field "mercato" could be relative to more tables listed in the from clause"
i can't figure it out
thanks