Range

Jeff_Ford

Registered User.
Local time
Today, 00:44
Joined
Aug 23, 2003
Messages
20
Probably a simple one but, what would i type in the control source of a text box if i wanted it to display the Max - Min value of a number of text box values
 
Jeff,

That depends. Where do the textboxes get their values?
If it is from a table, then you can use functions like DMin and
DMax.

If they are just a bunch of textboxes that someone enters
values in then you will have to check each one against the
others. Not too difficult, if you name them properly.

Need more info.

Wayne
 
Yeah they get ther values from data input by a user, the textboxes are called

Basecoat Thickness #1
Basecoat Thickness #2
Basecoat Thickness #3
Basecoat Thickness #4
Basecoat Thickness #5
Basecoat Thickness #etc
 
So would the control source be somethng like

= Max ([Basecoat Thickness #1] + [Basecoat Thickness #2] + [Basecoat Thickness #3]) - Min ([Basecoat Thickness #1] + [Basecoat Thickness #2] + [Basecoat Thickness #3])

............?
 
If you have fields Base coat1, base coat2 etc, then you have a design flaw. Your description implies that you have re-created a spreadsheet in Access. In simple terms you only need one field BaseCoat and another field which defines the layer that the record applies to.
Search here for Normalise, Normalising, Normalizing etc
 
believe me it would be too much to redesign now, can i not use Vb to find the max, min and do the calc OR do the calc in a query.
 
With similarly named text boxes (e.g., Field1, Field2, etc.,) you can set up a loop that complete an action on each box in turn. I've attached a small example which hopefully will provide food for thought.

You should consider eliminating all spaces and non-alpha-numeric characters from your control names. It makes them a lot easier to work with.
 

Attachments

Users who are viewing this thread

Back
Top Bottom