473,507 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo box to select report language

135 New Member
Hello,

I need the user to be able to select the language of some reports. Right now every product has already its current french and english name. And I was about to simply create another whole set of reports with the modified queries.

I think there must be a way to create a combobox or user input so that the user can select the language...How can i do this?

Currently the record source for the FRENCH reports is:
Expand|Select|Wrap|Line Numbers
  1.  SELECT Engineering.Project, Engineering.[Product Name French],  Engineering.Commodity, Engineering.Seating, Engineering.Variant1, Engineering.Description, Engineering.Material, Engineering.Weight, Engineering.Thickness, Engineering.Density, Engineering.Variant2, Engineering.Variant3, Engineering.[Level 1 Driver], Engineering.[Level 1 Passenger], Engineering.[Level 1 Rear], Engineering.[Level 2 Driver], Engineering.[Level 2 Passenger], Engineering.[Level 2 Rear], Engineering.[Level 3 Driver], Engineering.[Level 3 Passenger], Engineering.[Level 3 Rear], Engineering.[Level 3 Rear], Engineering.Level4Driver, Engineering.Level4Passenger, Engineering.Level4Rear, Engineering.Level5Driver, Engineering.Level5Passenger, Engineering.Level5Rear, Engineering.Level6Driver, Engineering.Level6Passenger, Engineering.Level6Rear, Engineering.Level7Driver, Engineering.Level7Passenger, Engineering.Level7Rear FROM Engineering WHERE (((Engineering.Variant1)=-1)); 
and the one for the ENGLISH reports needs to be:
Expand|Select|Wrap|Line Numbers
  1. SELECT Engineering.Project, [Product Names].[Product Name English],  Engineering.Commodity, Engineering.Seating, Engineering.Variant1, Engineering.Description, Engineering.Material, Engineering.Weight, Engineering.Thickness, Engineering.Density, Engineering.Variant2, Engineering.Variant3, Engineering.[Level 1 Driver], Engineering.[Level 1 Passenger], Engineering.[Level 1 Rear], Engineering.[Level 2 Driver], Engineering.[Level 2 Passenger], Engineering.[Level 2 Rear], Engineering.[Level 3 Driver], Engineering.[Level 3 Passenger], Engineering.[Level 3 Rear], Engineering.[Level 3 Rear], Engineering.Level4Driver, Engineering.Level4Passenger, Engineering.Level4Rear, Engineering.Level5Driver, Engineering.Level5Passenger, Engineering.Level5Rear, Engineering.Level6Driver, Engineering.Level6Passenger, Engineering.Level6Rear, Engineering.Level7Driver, Engineering.Level7Passenger, Engineering.Level7Rear FROM [Product Names] INNER JOIN Engineering ON [Product Names].[Product Name]=Engineering.[Product Name French]  WHERE (((Engineering.Variant1)=-1));   
Thanks,
Gilberto
Oct 9 '07 #1
3 1180
nico5038
3,080 Recognized Expert Specialist
Hello,

I need the user to be able to select the language of some reports. Right now every product has already its current french and english name. And I was about to simply create another whole set of reports with the modified queries.

I think there must be a way to create a combobox or user input so that the user can select the language...How can i do this?

Currently the record source for the FRENCH reports is:
Expand|Select|Wrap|Line Numbers
  1.  SELECT Engineering.Project, Engineering.[Product Name French],  Engineering.Commodity, Engineering.Seating, Engineering.Variant1, Engineering.Description, Engineering.Material, Engineering.Weight, Engineering.Thickness, Engineering.Density, Engineering.Variant2, Engineering.Variant3, Engineering.[Level 1 Driver], Engineering.[Level 1 Passenger], Engineering.[Level 1 Rear], Engineering.[Level 2 Driver], Engineering.[Level 2 Passenger], Engineering.[Level 2 Rear], Engineering.[Level 3 Driver], Engineering.[Level 3 Passenger], Engineering.[Level 3 Rear], Engineering.[Level 3 Rear], Engineering.Level4Driver, Engineering.Level4Passenger, Engineering.Level4Rear, Engineering.Level5Driver, Engineering.Level5Passenger, Engineering.Level5Rear, Engineering.Level6Driver, Engineering.Level6Passenger, Engineering.Level6Rear, Engineering.Level7Driver, Engineering.Level7Passenger, Engineering.Level7Rear FROM Engineering WHERE (((Engineering.Variant1)=-1)); 
and the one for the ENGLISH reports needs to be:
Expand|Select|Wrap|Line Numbers
  1. SELECT Engineering.Project, [Product Names].[Product Name English],  Engineering.Commodity, Engineering.Seating, Engineering.Variant1, Engineering.Description, Engineering.Material, Engineering.Weight, Engineering.Thickness, Engineering.Density, Engineering.Variant2, Engineering.Variant3, Engineering.[Level 1 Driver], Engineering.[Level 1 Passenger], Engineering.[Level 1 Rear], Engineering.[Level 2 Driver], Engineering.[Level 2 Passenger], Engineering.[Level 2 Rear], Engineering.[Level 3 Driver], Engineering.[Level 3 Passenger], Engineering.[Level 3 Rear], Engineering.[Level 3 Rear], Engineering.Level4Driver, Engineering.Level4Passenger, Engineering.Level4Rear, Engineering.Level5Driver, Engineering.Level5Passenger, Engineering.Level5Rear, Engineering.Level6Driver, Engineering.Level6Passenger, Engineering.Level6Rear, Engineering.Level7Driver, Engineering.Level7Passenger, Engineering.Level7Rear FROM [Product Names] INNER JOIN Engineering ON [Product Names].[Product Name]=Engineering.[Product Name French]  WHERE (((Engineering.Variant1)=-1));   
Thanks,
Gilberto
The "normalized" way would have been to create a tblProduct with atleast three fields: ID (autonumber or unique number used in stock), ProductNameEnglish, ProductNameFrench
When the Productname is needed you link the tblEngineering to tblProduct using the ID.
When you have a frmReport form you can add a combo or Optionbox to determine the language and in the query you can refer to thet field to determine the language to use like:
Expand|Select|Wrap|Line Numbers
  1. select IIF(Forms("frmReport")!Option=1,ProductNameEnglish,ProductNameFrench) as Productname, ...
  2.  
Now use on the form the field [ProductName] form the report query and it will be filled with the right language.

Nic;o)
Oct 9 '07 #2
Gilberto
135 New Member
The "normalized" way would have been to create a tblProduct with atleast three fields: ID (autonumber or unique number used in stock), ProductNameEnglish, ProductNameFrench
When the Productname is needed you link the tblEngineering to tblProduct using the ID.
When you have a frmReport form you can add a combo or Optionbox to determine the language and in the query you can refer to thet field to determine the language to use like:
Expand|Select|Wrap|Line Numbers
  1. select IIF(Forms("frmReport")!Option=1,ProductNameEnglish,ProductNameFrench) as Productname, ...
  2.  
Now use on the form the field [ProductName] form the report query and it will be filled with the right language.

Nic;o)
Thanks again Nico. I get the idea, but i have problems with the query...where exaclty should i use this code?

Thanks
Gilberto
Oct 10 '07 #3
nico5038
3,080 Recognized Expert Specialist
Basically it's no code, but part of the query.
In the SQL mode yuo can enter instead of a fieldname from the table:
IIF(Forms("frmReport")!Option=1,ProductNameEnglish ,ProductNameFrench) as Productname,

And in the graphical query editor you enter in the cell that holds normally the name of a tablefield:
Productname:IIF(Forms("frmReport")!Option=1,Produc tNameEnglish,ProductNameFrench)

Clearer?

Nic;o)
Oct 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2369
by: Dalan | last post by:
I have been searching the archives in an effort to discover how to derive a dual use of a single combo box - so far no go. I found the piece below which pretty much represents the usage. To...
1
1644
by: Andrew Parsons | last post by:
Apologies if this is an old chestnut, but I can't find an answer anywhere! I have a form which has a button which opens a report. This all works perfectly well. However, I am trying to set up a...
4
7135
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2)...
5
2205
by: consonanza | last post by:
I am working on a report filter form. It has 2 combo boxes (cmboSelectSubject and cmboSelectCategory) to select criteria. Selecting an entry in combo 1 restricts the options available in combo 2....
6
12453
by: fieldja | last post by:
I have a form called OwnerForm. It contains a combo box called Owner. The combo box looks up names from a table called OwnerName. It contains fields called OwnerID and Owner. I also have a main...
2
2794
by: ndeeley | last post by:
Hello, I need to create a command button to print a report in Preview mode using the criteria from a combo box. The combo box is unbound and holds a list of clients. I need the user to select...
3
3288
by: emily.a.day | last post by:
I have a book database, and I have set up a query to search by subject. As it is now, the searcher has to know the subject and type it into the query. I wonder if there is a way to have a combo...
7
3993
by: Ceebaby via AccessMonster.com | last post by:
Hi All Here's hoping someone can help me with this. I have a report based on a query where the criteria for 4 of the fields is set from an unbound form. I want the user to be able to select any...
1
1539
by: zufie | last post by:
I have 4 combo boxes on a report for the fields, City, County, IBCCP Agency Name, and Other Agency Name. The row source for City is: SELECT DISTINCTROW ., . FROM ; This allows the values...
10
2482
by: BeaBea | last post by:
Hi All, I have been reading some of the threads in your forum and decided to join and post my question. Hopefully it won't be too lengthy. I have created an Unbound Form called paramform2. ...
0
7319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7485
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5042
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.