conditional tab stops

  • Thread starter Thread starter maceslin
  • Start date Start date
M

maceslin

I have cboSolutionLocation and cboStatus on a form.
I do not want to be able to tab to cboSolution until cboStatus
="complete". I then want to make it mandatory to have to enter
something in cboSolutionLocation.

I am sure there is code form this but a s a newb I don't know it yet.
Tab stop is off in propoerties for cboSolutions

TIA
Dave
 
To disable cboSolutionLocation until cboStatus = "complete", use the
AfterUpdate event procedure of cboStatus to set the Enabled property of
cboSolutionLocation. Do the same in the Current event of the form. Use error
handling to move the focus elsewhere in case it is in cboSolutionLocation at
the time the code is trying to disable it.

To enforce the rule that cboSolutionLocation must have a value when
cboStatus is complete, open your table in design view. Open the Properties
box (View menu.) Beside the Validation Rule in the properties box, enter
this (it's one line):
([cboStatus] Is Null) OR ([cboStatus] <> "complete")
OR ([cboSolutionLocation] Is Not Null)

Notes:
1. Be sure to use the rule for the table (not that of a field, in the lower
pane of table design.)
2. Change the field names if necessary.
3. If the bound column of cboStatus is actually a hidden number, you need to
use the number instead of "complete".
 
Back
Top