check box activates next field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to access... is there a way to have a check box activate next field
or if you enter info in the QTY field it automatically puts a check in the
box on the Order field.
Thanks
 
This is just a sample:

Private Sub Text6_Exit(Cancel As Integer)

Me.Check1.Value = Len(Me.Text6) <> 0

End Sub


For your form, open the properties window and select the Events tab.
For the text box that contains the QTY value, enter the following in the
Exit() event of the control.
(I am assuming the control is named txtQTY and the check box is named
chkCheck1).

Private Sub txtQTY_Exit(Cancel as Integer)

Me.chkCheck1.Value = Len(Me.txtQTY) <> 0

End Sub

What this will do is whenever you leave the text box "QTY", it will
determine if you have something typed in the control. If yes, then the
lenght <> 0, thus the evaluation becomes true and this produces a check in
the check box control.

HTH

Rob Mastrostefano



--
FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
 

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

Similar Threads


Back
Top