Using access table to set caption of labels and MaxLength of textbox:


Dim intX as Integer

For intX = 0 to rs.Fields.Count-1
	label1(intX).Caption = rs.Fields(intX).Name
	text1(intX).MaxLength = rs.Fields(intX).Size
Next intX
Return