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!

Equasion Fields - Can they calculate

Status
Not open for further replies.

Donny

Technical User
May 3, 2001
19
0
0
US
I need access to recognise an equasion entered into a form field. I have pricing structures, some of which are straight prices, others are calculations such as (0.00736-0.0040)* [ other field ]. I need to use these fields in quiries to make calculations.

Users will enter these equasions directly into a form and i need them to see the equasion as entered not as a calculated figure.

Essentially i am entering pricing manuals into access an using these to perform calulations.

What Data type will allow me to achieve this - can it be done??
 
Use the eval function

EG
Code:
Private Sub Text32_DblClick(Cancel As Integer)
   Text32.Text = Eval(Text32.Text)
End Sub

In this example on double clicking:

If text32 held 10 it would remain 10
If text32 held 10 + 5 it would change to 15

X-) Billy H

bhogar@acxiom.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top