forcing the user to select a combo value option

V

vandy

Hi All,

I have a combo box in my child form which accepts 2 values issue and receipt.

I have to ensure that the user selects any one option when he enters values
against receiving or issuing the item.

Right now if the combo box value is not selected it affects the QOH does not
get calculated accordingly.

Any suggestion as to how to force the user select an option before saving
the transaction.


thanks in advance
 
V

vandy

Hi Karl,

Setting a default value in my case would not work since i have
+1 as Received and -1 as Issued . Only during the transaction can the item
have any one status. In the database the default value is set to 0

Can I control it programatically in any event.
thanks
 
P

Pieter Wijnen

You can still set a default value for the Control on the Form

However

Private Sub Form_BeforeUpdate (Cancel As Integer)
If IsNull(Me.cboStatus.Value) Then
Cancel = True
Me.cboStatus.SetFocus
Beep
End If
End sub

HtH

Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top