Hello All,
I have a table called Central_Currency which has got the following fields
Product: Text
Price : Number
Currency : Text
Dollar_Equal: Number
Region : Text
Month : Text
Year : Number
I have designed a form with combo boxes for the Product, Region, Month and Year. I have comboxes called Year1,Year2,Month1,Month2 for the Year and the Month respectively. I use the followin code to pull out records from between a specefic month and Year and Between another month and Year, Like all records from January 2009 to December 2010
I got some intial help from the forumn , however this code doesnt seem to work. I am very new to Programming enviroment and any help would be really appreciated.
Regards,
Vineeth Vasudevan
I have a table called Central_Currency which has got the following fields
Product: Text
Price : Number
Currency : Text
Dollar_Equal: Number
Region : Text
Month : Text
Year : Number
I have designed a form with combo boxes for the Product, Region, Month and Year. I have comboxes called Year1,Year2,Month1,Month2 for the Year and the Month respectively. I use the followin code to pull out records from between a specefic month and Year and Between another month and Year, Like all records from January 2009 to December 2010
Code:
SELECT C.Product, C.Price, C.Currency, C.Dollar_Equal, C.Region, C.Month, C.Year, GCC.Name
FROM GCC INNER JOIN Central_Currency AS C ON GCC.Products = C.Product
WHERE ((([C.Year])=[forms]![YearToYear]![Year1]) AND (([C.Month])>=[forms]![YearToYear]![Month1])) OR ((([C.Year])=[forms]![YearToYear]![Year2]) AND (([C.Month])<=[forms]![YearToYear]![Month2])) OR ((([C.Year])>[forms]![YearToYear]![Year1] And ([C.Year])<[forms]![YearToYear]![Year2]))
GROUP BY C.Product, C.Price, C.Currency, C.Dollar_Equal, C.Region, C.Month, C.Year, GCC.Name, C.Month, C.Year
HAVING (((C.Region) Like "*" & [Forms]![YearToYear]![Region] & "*") AND ((GCC.Name) Like "*" & [Forms]![YearToYear]![Product] & "*"));
I got some intial help from the forumn , however this code doesnt seem to work. I am very new to Programming enviroment and any help would be really appreciated.
Regards,
Vineeth Vasudevan