Hi MakeItSo,
Thanks a mill. for that. However it does not seem to work. (after this short paragraph of explanation for those less knowledgeable than you) I have pasted the code I entered that still does not seem to do it, giving me an “object required” error message.
I am trying to build an interface that will work in a few languages. What I would like is to have a single interface that the user can choose to see and use in the language of choice.
The user needs to get his buttons and labels in his own language and the text input has to be stored divided too (to allow effective cross language searching).
In an attempt to achieve this I created a table containing the different language options.
e.g.
fldFormId
fldAdress (values: cmdClose, txtArticleName)
fldProperty (values: Caption, ControlSource)
fldValueEN (values: “Close”, “fldArticleNameEN”)
fldValueFR (values: “Ferme” “fldArticleNameFR”)
Essentially all data should be combined into one single record regardless of what language it was entered in.
The code I wrote looks like this:
Code:
Dim FormId As Long
Dim Language, LanguageValue As String
Dim F_Adress, F_Property, F_Value, F_Chaining As String
Dim rstFormLanguage As Recordset
FormId = 1
Language = "EN"
LanguageValue = "fldValue" & Language
Set rstFormLanguage = CurrentDb.OpenRecordset("SELECT fldFormId, fldAdress, fldProperty, " & LanguageValue & " AS R_Value " _
& "FROM tblLanguagesInForms WHERE (((tblLanguagesInForms.fldFormId) =" & FormId & "))")
rstFormLanguage.MoveFirst
Do While Not rstFormLanguage.EOF
F_Adress = rstFormLanguage("fldAdress")
F_Property = rstFormLanguage("fldProperty")
F_Value = Replace(rstFormLanguage("R_Value"), "'", "''")
F_Chaining = "me." & F_Adress & "." & F_Property & " = " & F_Value
[COLOR=blue]HERE I'M STUCK !!!!![/color]
rstFormLanguage.MoveNext
Loop
Part of the objective is to allow the user to adapt the interface as well as to add more languages in the future without touching the code.
Thanks in advance, and a very fine day to you (all),
meirfri