code to open a query

Gilfdz

Registered User.
Local time
Today, 06:29
Joined
Sep 18, 2007
Messages
36
Hello,

I have two forms (ENGLISH and FRENCH) with some buttons that on click will open some reports.

For example in the FRENCH form i have a button that opens "BOMCompleteFR" which record source is:

SELECT [Product Names].[Product Name French], [Commodity Name].Commodity, Pricing.[Piece Price EXW], Pricing.[Packaging Price], Pricing.[Transportation Price], Pricing.[Piece Price DDP], Pricing.[Serial Tooling Price], Pricing.Comments, Pricing.[Comments 2], Pricing.EDD, Engineering.Seating, Engineering.[Level 1 Driver], Engineering.[Level 1 Passenger], Engineering.[Level 1 Rear] FROM [Product Names] INNER JOIN (([Commodity Name] INNER JOIN Engineering ON [Commodity Name].Commodity=Engineering.Commodity) INNER JOIN Pricing ON Engineering.[Product Name French]=Pricing.[Product Name French]) ON [Product Names].[Product Name French]=Engineering.[Product Name French] WHERE (((Engineering.Variant1)=-1));

In the ENGLISH form i have a button that opens "BOMCompleteEN" which record source is:

SELECT [Product Names].[Product Name English], [Commodity Name].CommodityEnglish, Pricing.[Piece Price EXW], Pricing.[Packaging Price], Pricing.[Transportation Price], Pricing.[Piece Price DDP], Pricing.[Serial Tooling Price], Pricing.Comments, Pricing.[Comments 2], Pricing.EDD, Engineering.Seating, Engineering.[Level 1 Driver], Engineering.[Level 1 Passenger], Engineering.[Level 1 Rear] FROM [Product Names] INNER JOIN (([Commodity Name] INNER JOIN Engineering ON [Commodity Name].Commodity=Engineering.Commodity) INNER JOIN Pricing ON Engineering.[Product Name French]=Pricing.[Product Name French]) ON [Product Names].[Product Name French]=Engineering.[Product Name French] WHERE (((Engineering.Variant1)=-1));

They are both IDENTICAL with the exeption of two fields. For this example i had to create TWO separate almost-idnetical reports.

I trying to find some code so that on button click i can tell the SAME report what record source i want to open. In this case for exaple if the button was in the french form, i want to indicate to follow the FRENCH query, thus the FRENCH record source.

Im new with access and i cant find the way to write this code.

Please HELP
 

Users who are viewing this thread

Back
Top Bottom