Unable to Save Combo Box Property change

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

I have a combo box which contains the drive letter the user chooses to
backup the database to. The default value of the combo box is set to "D",
however, when as user successfully backs up the database to another drive,
the code changes the combo box default value to that drive letter and then
saves the form with the following code: (Then the user doesn't need to
change the drive letter on subsequent backups)

cboCDDrive.DefaultValue = Chr$(34) & cboCDDrive &
Chr$(34)
DoCmd.Save acForm, "BackupMenu"

The default value is being changed but for some reason the form is NOT being
saved and therefore the combo box default value change is not being saved
either. It's as if Access doesn't realize a change to the form has been
made and hence no need to actually save.

Doesn't anyone know of a way to force the save action or have a suggestion
to do this differently?

Thanks VERY much for your time and assistance.

Rick C.
 
Rick said:
I have a combo box which contains the drive letter the user chooses to
backup the database to. The default value of the combo box is set to "D",
however, when as user successfully backs up the database to another drive,
the code changes the combo box default value to that drive letter and then
saves the form with the following code: (Then the user doesn't need to
change the drive letter on subsequent backups)

cboCDDrive.DefaultValue = Chr$(34) & cboCDDrive &
Chr$(34)
DoCmd.Save acForm, "BackupMenu"

The default value is being changed but for some reason the form is NOT being
saved and therefore the combo box default value change is not being saved
either. It's as if Access doesn't realize a change to the form has been
made and hence no need to actually save.

Doesn't anyone know of a way to force the save action or have a suggestion
to do this differently?

Changes like this to forms while open are not saved, but only exist until the form is
closed. For them to be permanent you would have to open the form in design mode,
make the change, and then save the form. You could store the value in a table and
then it would be saved.
 
Back
Top