Require field entry on previous field data

G

Guest

I want to set the property of a bound object to require entry depending on
the value entered in another bound object. Example is;

Fail/Pass: Field1 Comments: Field2

Fail/Pass: Field3 Comments: Field4

If entry in Field1 = "FAIL" focus skips to Field2 and requires data to be
entered then focus goes to Field3.

If entry in Field1 = "pass" focus skips Field2 and goes to Field3.

The same logic applies to Field3 and Field4.

I hope I have explained this correctly. Thanks for any help.

Dean
 
G

Guest

What you could do is have an ongotfocus for each entry field

In the code you parse the current values in the fields and accordingly you
give a messagebox and set the focus to the right control.

e.g.


private sub Field1_GotFocus()
HandleFocus
end sub

private sub Field2_GotFocus()
HandleFocus
end sub

private sub HandleFocus()
If Field1="Fail" then Field2.SetFocus
If Field3="Fail" then Field4.SetFocus
end Sub
 

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