it meabs my form variable is incorrect, substitute with correct one. else you may post your db for the last time.
hi i attached my data base
thanks
it meabs my form variable is incorrect, substitute with correct one. else you may post your db for the last time.
it meabs my form variable is incorrect, substitute with correct one. else you may post yo
ur db for the last time.
I haven't looked at your db but the error shown in your first screenshot is easily solved. You just need to specify one of the 2 tables for that field in your query.
Also just to point out for the third time about the )) bracket error which you haven't corrected
I haven't looked at your db but the error shown in your first screenshot is easily solved. You just need to specify one of the 2 tables for that field in your query.
Also just to point out for the third time about the )) bracket error which you haven't corrected
SELECT DiscoverMessinaCustomerT.Data, DiscoverMessinaCustomerT.Nome, DiscoverMessinaCustomerT.Cognome, DiscoverMessinaCustomerT.Nave, DiscoverMessinaCustomerT.Tour_Operator, DiscoverMessinaCustomerT.Codice_Operatore, PacchettiT.Tour_e_Escursioni, PacchettiT.Codice, PacchettiT.Adulto_€, PacchettiT.Ragazzo_€, PacchettiT.Bambino_€, [Adulto_€]*[adulti] AS Adulti_Totale, [Ragazzo_€]*[ragazzi] AS Ragazzi_Totale, [Bambino_€]*[bambini] AS Bambini_Totale, [Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale] AS Quota_Totale, ([Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale])*0.75 AS Netto
FROM PacchettiT INNER JOIN DiscoverMessinaCustomerT ON PacchettiT.PacchettoID = DiscoverMessinaCustomerT.Tour_e_Escursioni
WHERE (DiscoverMessinaCustomerT.Data Between Forms![CustomerSearchF]!txtDatadiinizio And Forms![CustomerSearchF]!txtDatadifine) And
(([Nome] Like "*" & [Forms]![CustomerSearchF]!txtNome & "*") Or
([Cognome] Like "*" & [Forms]![CustomerSearchF]!txtCognome & "*") Or
([Nave] Like "*" & [Forms]![CustomerSearchF]!txtPaese & "*") Or
([Tour_Operator] Like "*" & [Forms]![CustomerSearchF]!txtTour_Operator & "*") Or
([Cadice_Operatore] Like "*" & [Forms]![CustomerSearchF]!txtCadice_Operatore & "*"[COLOR="red"])[/COLOR] Or
([COLOR="Red"][PacchettiT.].[/COLOR][Tour_e_Escursioni] Like "*" & [Forms]![CustomerSearchF]!txtTour_e_Escursioni & "*"[COLOR="red"]))[/COLOR];
Hi dhanu
Sorry I haven't got time to look at your db today & anyway I don't want to 'tread on arnel's toes'
So the following may or may not be correct
Changes made (IN RED):
1. I've added the table name on the last line
2. I've corrected the bracketing on the last 2 lines
If you still get errors, it will need to wait for arnel or someone else to look at your db
Code:SELECT DiscoverMessinaCustomerT.Data, DiscoverMessinaCustomerT.Nome, DiscoverMessinaCustomerT.Cognome, DiscoverMessinaCustomerT.Nave, DiscoverMessinaCustomerT.Tour_Operator, DiscoverMessinaCustomerT.Codice_Operatore, PacchettiT.Tour_e_Escursioni, PacchettiT.Codice, PacchettiT.Adulto_€, PacchettiT.Ragazzo_€, PacchettiT.Bambino_€, [Adulto_€]*[adulti] AS Adulti_Totale, [Ragazzo_€]*[ragazzi] AS Ragazzi_Totale, [Bambino_€]*[bambini] AS Bambini_Totale, [Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale] AS Quota_Totale, ([Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale])*0.75 AS Netto FROM PacchettiT INNER JOIN DiscoverMessinaCustomerT ON PacchettiT.PacchettoID = DiscoverMessinaCustomerT.Tour_e_Escursioni WHERE (DiscoverMessinaCustomerT.Data Between Forms![CustomerSearchF]!txtDatadiinizio And Forms![CustomerSearchF]!txtDatadifine) And (([Nome] Like "*" & [Forms]![CustomerSearchF]!txtNome & "*") Or ([Cognome] Like "*" & [Forms]![CustomerSearchF]!txtCognome & "*") Or ([Nave] Like "*" & [Forms]![CustomerSearchF]!txtPaese & "*") Or ([Tour_Operator] Like "*" & [Forms]![CustomerSearchF]!txtTour_Operator & "*") Or ([Cadice_Operatore] Like "*" & [Forms]![CustomerSearchF]!txtCadice_Operatore & "*"[COLOR="red"])[/COLOR] Or ([COLOR="Red"][PacchettiT.].[/COLOR][Tour_e_Escursioni] Like "*" & [Forms]![CustomerSearchF]!txtTour_e_Escursioni & "*"[COLOR="red"]))[/COLOR];
Good luck
SELECT DiscoverMessinaCustomerT.Data, DiscoverMessinaCustomerT.Nome, DiscoverMessinaCustomerT.Cognome, DiscoverMessinaCustomerT.Nave, DiscoverMessinaCustomerT.Tour_Operator, DiscoverMessinaCustomerT.Codice_Operatore, PacchettiT.Tour_e_Escursioni, PacchettiT.Codice, PacchettiT.Adulto_€, PacchettiT.Ragazzo_€, PacchettiT.Bambino_€, [Adulto_€]*[adulti] AS Adulti_Totale, [Ragazzo_€]*[ragazzi] AS Ragazzi_Totale, [Bambino_€]*[bambini] AS Bambini_Totale, [Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale] AS Quota_Totale, ([Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale])*0.75 AS Netto
FROM PacchettiT INNER JOIN DiscoverMessinaCustomerT ON PacchettiT.PacchettoID = DiscoverMessinaCustomerT.Tour_e_Escursioni
WHERE (DiscoverMessinaCustomerT.Data Between Forms![CustomerSearchF]!txtDatadiinizio And Forms![CustomerSearchF]!txtDatadifine) And
(([Nome] Like "*" & [Forms]![CustomerSearchF]!txtNome & "*") Or
([Cognome] Like "*" & [Forms]![CustomerSearchF]!txtCognome & "*") Or
([Nave] Like "*" & [Forms]![CustomerSearchF]!txtPaese & "*") Or
([Tour_Operator] Like "*" & [Forms]![CustomerSearchF]!txtTour_Operator & "*") Or
([Cadice_Operatore] Like "*" & [Forms]![CustomerSearchF]!txtCadice_Operatore & "*") Or
([COLOR="Red"][PacchettiT][/COLOR].[Tour_e_Escursioni] Like "*" & [Forms]![CustomerSearchF]!txtTour_e_Escursioni & "*"));
Apologies - extra . crept in by mistake
Try again:
Code:SELECT DiscoverMessinaCustomerT.Data, DiscoverMessinaCustomerT.Nome, DiscoverMessinaCustomerT.Cognome, DiscoverMessinaCustomerT.Nave, DiscoverMessinaCustomerT.Tour_Operator, DiscoverMessinaCustomerT.Codice_Operatore, PacchettiT.Tour_e_Escursioni, PacchettiT.Codice, PacchettiT.Adulto_€, PacchettiT.Ragazzo_€, PacchettiT.Bambino_€, [Adulto_€]*[adulti] AS Adulti_Totale, [Ragazzo_€]*[ragazzi] AS Ragazzi_Totale, [Bambino_€]*[bambini] AS Bambini_Totale, [Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale] AS Quota_Totale, ([Adulti_Totale]+[Ragazzi_Totale]+[Bambini_Totale])*0.75 AS Netto FROM PacchettiT INNER JOIN DiscoverMessinaCustomerT ON PacchettiT.PacchettoID = DiscoverMessinaCustomerT.Tour_e_Escursioni WHERE (DiscoverMessinaCustomerT.Data Between Forms![CustomerSearchF]!txtDatadiinizio And Forms![CustomerSearchF]!txtDatadifine) And (([Nome] Like "*" & [Forms]![CustomerSearchF]!txtNome & "*") Or ([Cognome] Like "*" & [Forms]![CustomerSearchF]!txtCognome & "*") Or ([Nave] Like "*" & [Forms]![CustomerSearchF]!txtPaese & "*") Or ([Tour_Operator] Like "*" & [Forms]![CustomerSearchF]!txtTour_Operator & "*") Or ([Cadice_Operatore] Like "*" & [Forms]![CustomerSearchF]!txtCadice_Operatore & "*") Or ([COLOR="Red"][PacchettiT][/COLOR].[Tour_e_Escursioni] Like "*" & [Forms]![CustomerSearchF]!txtTour_e_Escursioni & "*"));
Hopefully its OK now but if not, see previous comments
here try this
i hope this is the final
finally? is over.
finally? is over.
No I don't think so....
Dhanu appears to have 2 new questions as a follow up ... or have you also answered those?![]()
finally? is over.