Here is what you can do...
You can use the Numeric Field and then set it Display Pattern as "zzzzz9" and then use the following FormCalc code in 'exit' event.
This logic will works even with add instance....may be you need to tweak the messages a little bit.
if (HasValue($)) then
if (($.rawValue == 0) or (($.rawValue >= 100000) and ($.rawValue <= 199999))) then
//value accepted
$.rawValue = $.rawValue
else
xfa.host.messageBox("Please check the number. 0 or a value between 100000 - 199999 is accepted.")
//$.rawValue = ""
xfa.host.setFocus($.somExpression)
endif
else
xfa.host.messageBox("0 or a value between 100000 - 199999 is required for Emplyee Number")
xfa.host.setFocus($.somExpression)
endif
Hope this helps. Let me know how that works.
Good luck,
SekharN,
www.lawson.com