Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form - Variable FIeld Length (same field)

Status
Not open for further replies.

filthepitome

Technical User
Aug 29, 2006
26
0
0
US
SO here is a quick break down. We get a file from a business group, and there are two fields I am concerned with for this, an example is below

Old Value New Value
Name ______ (6 underscores)
Drug ________ (8 underscores)
Name ______ (6 underscores)
Address __________ (10 underscores)

And it is expected the new value will be as many characters as there are underscores. SO, is there any way I can limit the number of characters the user enters into this field based on the underscores present?

Also, I should mention, all of the fields end up being concatenated in to one field which has to be 100 bytes long, no more no less.

TIA
 
To solve the first part of the dilemma, do an Access search on the masked edit control. Should be about what you need.
For the second, you can Trim each field, and use the format function with fixed-length string variables (Dim strVar As String * 8 for example) & concatenate.

Silence is golden.
Duct tape is silver.
 
I am still a bit confused. I know how to create an input mask, but the underscores already exist, and they are different character counts in each record but the field must be 20 characters long once all of the fields are concatenated.

so there is like a 2 charcter field, then a 10, then a 15, then a 20. So there may not be "characters" filling up those fields, there just has to be spaces/blank characters filling up the rest of the field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top