Private Sub fldSwitchLanguage_AfterUpdate()
If Nz(Me!fldSwitchLanguage, 0) <> 0 Then
SwitchLanguage Me!fldSwitchLanguage.Value
End If
End Sub
Private Sub SwitchLanguage(ByVal NewLangId As Long)
Dim strSQL As String
Dim Rst As DAO.Recordset
lngLang = NewLangId ' !!! lngLang is a global variable
' => I would change to Property and then implement the SQL statement in the property
strSQL = "UPDATE tblSettings SET LangCode=" & NewLangId
CurrentDbC.Execute strSQL, dbFailOnError
LoadLanguage Me
End Sub