Combo Box Defalut Value Question

crhodus

Registered User.
Local time
Today, 06:32
Joined
Mar 16, 2001
Messages
257
On my form, I have a Combo Box. In the On Current event for the Form, I have the following code.

Private Sub Form_Current()
Me.cmbProjStatus.Value = Me.cmbProjStatus.ItemData(0)
End Sub

The combo box has two value, ACTIVE and INACTIVE, that the user can choose from.

This piece of code allows the first item in my combo box, ACTIVE, to be automatically selected when creating a new record.

My problem is that if I browse through my records with this form, any record that has INACTIVE saved in the project status field is automatically saved as ACTIVE.

Any suggestions on how to prevent this from happening?

Thanks!
 
Code:
Private Sub Form_Current()
    If Me.NewRecord Then
        Me.cmbProjStatus.Value = Me.cmbProjStatus.ItemData(0) 
    End If
End Sub
 
Thanks!
 

Users who are viewing this thread

Back
Top Bottom