Hi,
I am unable to trigger a SAVE button to be enabled upon a change in the combo box selection. The combo box is populated by the following database query:
Private Sub LoadModelUnit()
Dim mrsModelUnit As Recordset
Dim sSQL As String
Set mrsModelUnit = New Recordset
sSQL = sSQL & "SELECT * FROM ModelUnit"
With mrsModelUnit
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.ActiveConnection = cnTestConnection
.LockType = adLockOptimistic
.Source = sSQL
.Open
Do Until .EOF
cboModelUnit.AddItem !ModelUnit
.MoveNext
Loop
End With
mrsModelUnit.Close
Set mrsModelUnit = Nothing
End Sub
When the user select a different item from the combo list, the SAVE button should be enabled by a call to a RecordChanged function, which just have a line for "cmdSave.enable = true," from the combo change event:
Private Sub cboModelUnit_Change()
RecordChanged
End Sub
But the SAVE button was not enabled as expected. What type of coding should I put in to correct it?
Thanks,
Mike
I am unable to trigger a SAVE button to be enabled upon a change in the combo box selection. The combo box is populated by the following database query:
Private Sub LoadModelUnit()
Dim mrsModelUnit As Recordset
Dim sSQL As String
Set mrsModelUnit = New Recordset
sSQL = sSQL & "SELECT * FROM ModelUnit"
With mrsModelUnit
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.ActiveConnection = cnTestConnection
.LockType = adLockOptimistic
.Source = sSQL
.Open
Do Until .EOF
cboModelUnit.AddItem !ModelUnit
.MoveNext
Loop
End With
mrsModelUnit.Close
Set mrsModelUnit = Nothing
End Sub
When the user select a different item from the combo list, the SAVE button should be enabled by a call to a RecordChanged function, which just have a line for "cmdSave.enable = true," from the combo change event:
Private Sub cboModelUnit_Change()
RecordChanged
End Sub
But the SAVE button was not enabled as expected. What type of coding should I put in to correct it?
Thanks,
Mike