>Well... that really goes against the whole Windows philosophy of using
>interactive forms.
I realize that. But this is a timesheet program and I need to structure it
along predictated lines (not mine)
>You can do the latter easily by checking for non-Null values in all controls
>in the Form's BeforeUpdate event, and setting Cancel to true with a MsgBox
>warning if they've left something blank.
This was pretty much the way I have been proceeding. I was using the Form's
BeforeUpdate Event to house a small VB App that would check for Null or blank
entries. However, this is a blanket program which checks ALL the controls.
Even the ones I don't want checked. And it causes an error. Therefore I was
going to try a more "focused" approach by structing an IF statement using the
actual name of the control(s) I need to check.
Your thoughts?
John W. Vinson - 29 May 2008 17:13 GMT
>This was pretty much the way I have been proceeding. I was using the Form's
>BeforeUpdate Event to house a small VB App that would check for Null or blank
>entries. However, this is a blanket program which checks ALL the controls.
>Even the ones I don't want checked. And it causes an error. Therefore I was
>going to try a more "focused" approach by structing an IF statement using the
>actual name of the control(s) I need to check.
One way to do this is to use the controls' Tag property. For instance you
could set the Tag property to be "NonNull" (or to contain that string) for
each control which is required; you can then loop through the form's Controls
collection and only check those controls with "NonNull" in the Tag property
(before checking the control's Value, since many kinds of controls don't have
a Value).

Signature
John W. Vinson [MVP]
David W. Fenton - 30 May 2008 00:47 GMT
>>Well... that really goes against the whole Windows philosophy of
>>using interactive forms.
>
> I realize that. But this is a timesheet program and I need to
> structure it along predictated lines (not mine)
Then use a wizard type interface. This can be done easily with a tab
control with the tabs hidden. You'd enable the NEXT>> button only
when the fields on that tab page have been properly filled out.

Signature
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/