Hi everyone,
i try to use global variables, but when i want to set a value into those variables, and print it out with MsgBox, these variables stay empty??
I declare the variable in a module like this:
in the first form that give a user a language choice i open the next form and set the variable GLB_taal as follows:
In the BeginFrm i have the following code to set the text of labels and buttons:
I think i am forgetting something in my code tho call or set the variable?
Anyone knows the details of working with global variables?
Wim
i try to use global variables, but when i want to set a value into those variables, and print it out with MsgBox, these variables stay empty??
I declare the variable in a module like this:
Code:
Global GLB_taal As String
Code:
DoCmd.OpenForm="BeginFrm"
GLB_taal = "NL"
In the BeginFrm i have the following code to set the text of labels and buttons:
Code:
Private Sub Form_Load()
Dim language As String
language = GBL_taal
MsgBox language
If (language = "NL") Then
Me.LblTitle.Caption = "Landmeter"
Me.LblID.Caption = "Geef ID in: "
Me.BtnGaVerder.Caption = "Ga Verder"
Me.LblSearchLan.Caption = "Zoek een Landmeter: "
Me.BtnZoeken.Caption = "Zoeken"
Me.LblReport.Caption = "Rapportage"
Me.BtnRapportage.Caption = "Rapportage"
Me.LblSetHoursCompulsory.Caption = "Geef de verplichte uren per jaar in: "
Me.BtnVerplichteUren.Caption = "Uren Ingeven"
Me.FillupBtn.Caption = "Vul vrijstellingen en Max uren op" 'Na afwerking weg doen en in batch plaatsen
Else
If (language = "FR") Then
Me.LblTitle.Caption = "Arpenteur"
Me.LblID.Caption = "Entrer ID: "
Me.BtnGaVerder.Caption = "Allez"
Me.LblSearchLan.Caption = "Trouver un Arpenteur: "
Me.BtnZoeken.Caption = "Recherche"
Me.LblReport.Caption = "Compte-rendu: "
Me.BtnRapportage.Caption = "Compte-rendu"
Me.LblSetHoursCompulsory.Caption = "Entrez les heures requises par an: "
Me.BtnVerplichteUren.Caption = "Saisie heures"
Me.FillupBtn.Caption = "Entrez exemptions et Max. heures Automatique" 'Na afwerking weg doen en in batch plaatsen
End If
End If
End Sub
I think i am forgetting something in my code tho call or set the variable?
Anyone knows the details of working with global variables?
Wim