Limiting field size of a form variable

  • Thread starter Thread starter tbasha
  • Start date Start date
T

tbasha

Guest
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.
 
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
 
go into the properties for the field
and select can grow option to no.
 

Users who are viewing this thread

Back
Top Bottom