donjohnson
Programmer
- Jun 23, 2004
- 53
Hello!
I would like to call a subroutine to set errors for a user form, passing the field name in error and the related error message. Can you tell me if this is possible?
For example, instead of coding for each field:
I would like the subrtn to look like:
and then on the edit, only call the subroutine with parms.
Also, is there any way to make a field numeric input only in the form textbox properties, rather than pass it to the VBA code to trip an error? Or - how would you define a field to be numeric and > 0?
Thanks!
Don
I would like to call a subroutine to set errors for a user form, passing the field name in error and the related error message. Can you tell me if this is possible?
For example, instead of coding for each field:
Code:
iErrCt = iErrCt + 1
strErrMsg(iErrCt) = "This is the error message"
EntryForm.fLocMH.SetFocus
EntryForm.fLocMH.BackColor = lErrColor
I would like the subrtn to look like:
Code:
iErrCt = iErrCt + 1
strErrMsg(iErrCt) = parm-err-msg
EntryForm.parm-fld-name.SetFocus
EntryForm.parm-fld-name.BackColor = lErrColor
Also, is there any way to make a field numeric input only in the form textbox properties, rather than pass it to the VBA code to trip an error? Or - how would you define a field to be numeric and > 0?
Thanks!
Don