View Full Version : Limiting field size of a form variable


tbasha
09-20-2000, 10:35 AM
How can i limit a field size in a form? The field is not attached to any database field. Is there any option i can use ib field properties to do it? I want to know both for numeric and alphanumeric data type fields.

Travis
09-20-2000, 11:30 AM
on the Change Event of the field check its size:

for text use Len(me.[FieldName])
for values just set an upper and lower limit and check to see if its within that limit

if Len(me.[FieldName])< UpperLimit then
'its too long
else
'its just right
end if


if me.[fieldname]=< UpperLimit and me.[fieldName]=> LowerLimit then
'its ok
else
'its not in the range
end if

rjohnstone1
09-20-2000, 12:56 PM
go into the properties for the field
and select can grow option to no.