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

Entering a percentage - data entry question 1

Status
Not open for further replies.

nedstar1

IS-IT--Management
Mar 2, 2001
127
US
Hi friends,

I'm building a form that will allow a user to enter a percentage by which production of an ordered item can be increased. I ahve formatted the field as actual, percentage - this was the only way I could figure out to keep access from rounding the percentage off in one way or another - why does Access do this>

Anyhow, the field is set up so that if you type 1.5, it returns the value of 150%. I would like to know how I can reformat the field so that 1.5 is received or interpreted as 1.5%. can I use the events for the form field in some way?

TIA
Regards,
Nedstar1
 
I assume you're going to be using this in a calculation to determine an order amount - I have a similar setup regarding adding a fuel percentage to a transportation rate. In the data entry, the user enters 9 for 9% fuel. I have another hidden field that is updated through the first fields afterupdate event to equal fuel_pct *.01. The user sees 9%, but all calculations use .09 to calculate fuel. Example: amt1 fuel_pct hiddenfld fuel_chg
$100.00 9% .09 $9.00

Hope this is what you were looking for.
 
Hi dweis,

This looks to be exactly what I'm looking for, but I could use a few tips on setting it up. Does the hidden field have to exist on the table that backs up the form, or can it simply be added as a text box, set to hidden, and have the formula inserted?

Then I could use a CASE operator as follows:
SELECT tblJobs.JobCreationDate, tblJobs.JobQty, tblJobVarious.JobVarFreeOvers, tblJobVarious.JobVarOvers
CASE
WHEN tblJobs.JobCreationDate<=7/15/2004
THEN
tblJobVarious.QtyWOvers=tblJobs.JobQty+(tblJobs.JobQty*tblJobVarious.JobVarFreeOversHidden)
WHEN tblJobs.JobCreationDate>7/15/2004
THEN
tblJobVarious.QtyWOvers=tblJobs.JobQty+(tblJobs.JobQty*tblJobVarious.JobVarOversHidden)
END
FROM tblJobs LEFT JOIN tblJobVarious ON tblJobs.JobID = tblJobVarious.JobID;


Do you concur?

Thanks for the input - always a welcome thing with me.

Regards,
Nedstar1
 
Sorry - I'm using a conditional date formula to choose the correct percentage to use - that's for another post.

Please disregard, and thanks again.

Nedstar1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top