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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculations on text data type

Status
Not open for further replies.

Richey

Technical User
Aug 29, 2000
121
GB
I have a form which is based on a table, where the data types are text - in most cases the entries in the text fields will be numbers.
I want the continious form to do a sum, in the form footer, on the text boxes. Obviously with them being data type text, it won't work.
Is there a way round this?
Thanks

Richey
 
Richie,
Try this:

(a) Add an unbound text control in the form footer of your form.

(b) Set its ControlSource property to the following:
=Sum(IIf(IsNumeric([SourceControl]),Val([SourceControl]),0))

In the above setting, change SourceControl to the name of your control which you want to summed.

This should hopefully do the trick for you,

Cheers,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top