How Do I Conditionally Lock, Unlock, and Skip Fields?

  • Thread starter skyrise via AccessMonster.com
  • Start date
S

skyrise via AccessMonster.com

I understand the basics of what I’m trying to do with this, but not the full
script.

My database has a few combo boxes that include “Other†as one of the options.

If “Other†is not seleted, then I’m trying to get a corresponding field to
lock, the cursor to skip over that field, and move to the next data entry
field.

If “Other†is selected, then I’m trying to get the corresponding field to
unlock, the cursor placed in that field so that the data can be entered, and
then to move to the next field.
 
D

Douglas J. Steele

Private Sub MyCombobox_AfterUpdate()

If Me.MyCombobox = "Other" Then
Me.SomeTextbox.Locked = False
Me.SomeTextbox.SetFocus
Else
Me.SomeTextbox.Locked = True
Me.SomeOtherTextbox.SetFocus
Else

End Sub
 
L

Linq Adams via AccessMonster.com

And in order for this conditional formatting to persist, as you move from
record to record, the combobox will have to be bound to a field in the
underlying table and the same code placed in the Form_Current event.
 

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