Hi Group,
I've inherited an Access application - part of the code allows a user to set their Branch number using a form.
The new Branch number is then held in the registry using the following code:
If blnBranchNumberChanged = True Then
strNewBranch = txtBranchNo.Text
If Not DataValidation.InvalidBranchN(strNewBranch) Then
strNewBranch = Format(strNewBranch, "0000")
SaveSettings "Settings", "Branch Number", strNewBranch
BranchNumber = strNewBranch
End If
End If
The SaveSettings module:
Private Sub SaveSettings(ByVal strSettingType As String, ByVal strSetting As String, ByVal strNewValue As String)
''File Locations', 'Database', newValue
On Error GoTo Err_SaveSettings
SaveSetting gstrAppName, strSettingType, strSetting, strNewValue
Exit_SaveSettings:
Exit Sub
Err_SaveSettings:
ErrorControl.HandleError Err.Number, Err.Description, "frmOptions::SaveSettings"
Resume Exit_SaveSettings
End Sub
There are changes I need to make to the program - some validation on new fields I will be adding.
My question is if I make the necessary changes and re-distribute the mde file, will this affect the registry settings already held(for existing users)? i.e would the user have to go through the form again and re-set their Branch number given the code shown or will the existing value be retrieved from the registry?
This is the code used when the form is loaded:
BranchNumber = GetSetting(gstrAppName, "Settings", "Branch Number", "0000")
Will I need to change this?
Kind Regards
I've inherited an Access application - part of the code allows a user to set their Branch number using a form.
The new Branch number is then held in the registry using the following code:
If blnBranchNumberChanged = True Then
strNewBranch = txtBranchNo.Text
If Not DataValidation.InvalidBranchN(strNewBranch) Then
strNewBranch = Format(strNewBranch, "0000")
SaveSettings "Settings", "Branch Number", strNewBranch
BranchNumber = strNewBranch
End If
End If
The SaveSettings module:
Private Sub SaveSettings(ByVal strSettingType As String, ByVal strSetting As String, ByVal strNewValue As String)
''File Locations', 'Database', newValue
On Error GoTo Err_SaveSettings
SaveSetting gstrAppName, strSettingType, strSetting, strNewValue
Exit_SaveSettings:
Exit Sub
Err_SaveSettings:
ErrorControl.HandleError Err.Number, Err.Description, "frmOptions::SaveSettings"
Resume Exit_SaveSettings
End Sub
There are changes I need to make to the program - some validation on new fields I will be adding.
My question is if I make the necessary changes and re-distribute the mde file, will this affect the registry settings already held(for existing users)? i.e would the user have to go through the form again and re-set their Branch number given the code shown or will the existing value be retrieved from the registry?
This is the code used when the form is loaded:
BranchNumber = GetSetting(gstrAppName, "Settings", "Branch Number", "0000")
Will I need to change this?
Kind Regards