Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Form and Formulario 1

Status
Not open for further replies.

cparralesl

Programmer
Jan 27, 2002
118
NI
Hello Guys,

I have an Access DB 2007 in spanish. The screens have comboxes that takes its value depending onthe value from others combobox. In the rowsource the reference starts with "Formulario" word, because my MS Access is in psanish and the user has the english version; the rest of the users have MS Access in English version actually.

When i run the application in English version come up pop up screens asking for values for that reference. If i change "Form" instead of "Formulario" it works, but the problem is that I have many screens and many comboboxes.

Is there a way to say to MS Access that "Formulario" is the same that "Form"?

I appreciate the help you can give me.

Cesar Humberto Parrales
Application Support
 
I do not know, but you could use this code to replace them all.
Code:
Public Sub convertToEnglishReference()
  Dim frm As Access.Form
  Dim frmName As String
  Dim accObj As Access.AccessObject
  Dim ctl As Access.Control
  
  For Each accObj In CurrentProject.AllForms
    frmName = accObj.Name
    DoCmd.OpenForm frmName, acDesign, , , , acHidden
    Set frm = Forms(frmName)
    For Each ctl In frm.Controls
      If ctl.ControlType = acComboBox Or ctl.ControlType = acListBox Then
        Debug.Print ctl.RowSource
        ctl.RowSource = Replace(ctl.RowSource, "Formulario", "Forms")
        'add other things to replace
        Debug.Print ctl.RowSource
      End If
    Next ctl
    DoCmd.Close acForm, frmName, acSaveYes
  Next accObj
End Sub

I assume you mean Forms not Form as in:
[Forms]![Employees]!cmboOne
 
Wow!

So fast answer, so fast process!

And yes, it's "Forms" Not "Form"

I give a star to you, bacause i'm sure your answer is really helpful.

Thanks a lot!

Regards,

Cesar Humberto Parrales
Application Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top