M
Mark Kubicki
I suspect, I'm in the right church, but the wrong pew...
I want to update a table, which is not the record source for the current
form, when the value of a combobox [cboPresetOption] on the current form is
changed.
the table [tbeFixtureSchedulePrintOptions] which contains the fields to be
updated has only (1) record
I've got the code below written, but the record is not updatin; and I
suspect I have a simple error, but am blind to it at this particular
moment...
thanks in advance,
-mark
---------------------------------------------
Private Sub cboPresetOption_Change()
Set Db = CurrentDb()
Dim rst As DAO.Recordset
Set rst = Db.OpenRecordset("SELECT * FROM
[tbeFixtureSchedulePrintOptions]")
With rst
.Edit
Select Case .cboPresetOption
Case Is = "First Draft"
'fixture identifier options
.ManufacturersName = 1
.InclCatalogNo = "no"
.InclAltMfrs = "no"
'description options
.ShortDescription.Value = "no"
.InclLocations = "yes"
.SeeSketch = "no"
.InclInstallationNotes = "no"
.InclLeadTime = "no"
...
Case Is = "Working Copy"
'fixture identifier options
.ManufacturersName = 2
.InclCatalogNo = "yes"
.InclAltMfrs = "yes"
.ShortDescription.Value = "yes"
...
Case Is = "Preliminary" '
...
End Select
.Update
End With
Me.cmdFixtureSchedulePrint.SetFocus
Set dbs = Nothing
Set rst = Nothing
End Sub
I want to update a table, which is not the record source for the current
form, when the value of a combobox [cboPresetOption] on the current form is
changed.
the table [tbeFixtureSchedulePrintOptions] which contains the fields to be
updated has only (1) record
I've got the code below written, but the record is not updatin; and I
suspect I have a simple error, but am blind to it at this particular
moment...
thanks in advance,
-mark
---------------------------------------------
Private Sub cboPresetOption_Change()
Set Db = CurrentDb()
Dim rst As DAO.Recordset
Set rst = Db.OpenRecordset("SELECT * FROM
[tbeFixtureSchedulePrintOptions]")
With rst
.Edit
Select Case .cboPresetOption
Case Is = "First Draft"
'fixture identifier options
.ManufacturersName = 1
.InclCatalogNo = "no"
.InclAltMfrs = "no"
'description options
.ShortDescription.Value = "no"
.InclLocations = "yes"
.SeeSketch = "no"
.InclInstallationNotes = "no"
.InclLeadTime = "no"
...
Case Is = "Working Copy"
'fixture identifier options
.ManufacturersName = 2
.InclCatalogNo = "yes"
.InclAltMfrs = "yes"
.ShortDescription.Value = "yes"
...
Case Is = "Preliminary" '
...
End Select
.Update
End With
Me.cmdFixtureSchedulePrint.SetFocus
Set dbs = Nothing
Set rst = Nothing
End Sub