how do i set access to use fractions and add/multiply them?

S

Steve

Look back at the tables I suggested. Look at TblFractionPart.
DecimalOfFractionPart gives you the decimal.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
G

Guest

there is not enuff space where the fractions are entered to use the combo
boxes. can a single or 3 text boxes be used?
 
J

jrmask via AccessMonster.com

I do this for corrugated sheets to fiqure board feet. I use fractions for the
calculations and taught my people to use them by suppling a conversion sheet.
Now they enter 1.75 for 1 3/4 inches or 5.625 for 5 5/8. Most do not have to
look at the conversion chart any longer. =([txtLenght] * [txtwidth]) /144


going to be calculating board feet, the formula is WxL \ 144 (11 7/8 x 12 7/8
Divided by 144 and the rusult will be shown in a seprit text box . I can send
you the DB if that will help.
Show me how you are going to apply a measurement that includes fractions and
maybe I can help you from there. For example, your measurement is 125 5/8",
[quoted text clipped - 74 lines]
 
G

Guest

That would be a simple solution, however this will be used not only by the
workers here but by our clients when they come in to the office and place
orders on site.
and possibly on the road with our sales people.


jrmask via AccessMonster.com said:
I do this for corrugated sheets to fiqure board feet. I use fractions for the
calculations and taught my people to use them by suppling a conversion sheet.
Now they enter 1.75 for 1 3/4 inches or 5.625 for 5 5/8. Most do not have to
look at the conversion chart any longer. =([txtLenght] * [txtwidth]) /144


going to be calculating board feet, the formula is WxL \ 144 (11 7/8 x 12 7/8
Divided by 144 and the rusult will be shown in a seprit text box . I can send
you the DB if that will help.
Show me how you are going to apply a measurement that includes fractions and
maybe I can help you from there. For example, your measurement is 125 5/8",
[quoted text clipped - 74 lines]
ba
able to add, multiply and divide them.
 
J

John W. Vinson

going to be calculating board feet, the formula is WxL \ 144 (11 7/8 x 12 7/8
Divided by 144 and the rusult will be shown in a seprit text box . I can send
you the DB if that will help.

Kevin, did you ever get this working? I really think that the function I
posted will let you do so. Please let me know if you're having trouble
implementing it and if I can help get it working.

John W. Vinson [MVP]
 
G

Guest

OK looks like i won't get the mathmatics i need to work in Access directly.
so how do i tell a imbeded Excel sheet to lookup information from a access
text field?
 
J

John W. Vinson

OK looks like i won't get the mathmatics i need to work in Access directly.

You CAN get the mathmatics you need to work in Access directly. Did you try my
function? IT WILL WORK.

If you tried and had problems, please post what you did and what problem you
had.

John W. Vinson [MVP]
 
G

Guest

ok the fields where fractions will be used are named "width## and Height##"
where ## are numbered 01 to 41. there will be several lines on the order
form where this will be done. the error i get is telling me the number i
enter is to large for the field (5 7/8) the error reads "The Value you
entered isn't valid for this field" "For example, you may have entered text
in a numeric field or a number that is larger then the Field Size setting
permits."

I placed your code in a public module and named it "fractonum"
the field properties are as follows

Name width01
controle source (blank)
Format Scientific
Decimal Places Auto
Input Mask (blank)
 
J

John W. Vinson

ok the fields where fractions will be used are named "width## and Height##"
where ## are numbered 01 to 41.

Then your table design IS WRONG.

"Fields are expensive, records are cheap". If you have 41 sets of dimensions,
you'll someday have 42. You should have the data stored in a second table,
with one set of dimensions per record, rather then per field.

It may be that you're starting your database design with the form (perhaps
imitating a paper form?); if so, that's the wrong end about. You wouldn't
start building a house frame before you've poured the foundations - and a
properly normalized set of Tables is the foundation of your database! The
forms come later.
there will be several lines on the order
form where this will be done. the error i get is telling me the number i
enter is to large for the field (5 7/8) the error reads "The Value you
entered isn't valid for this field" "For example, you may have entered text
in a numeric field or a number that is larger then the Field Size setting
permits."
I placed your code in a public module and named it "fractonum"

Change the name of the module. It must have a name *DIFFERENT* from the name
of the function. I'd just call it basFracToNum.

You need TWO TEXTBOXES - one, probably unbound, let's call it txtWidth; and
the other bound to a Number field in your table, let's call it txtNumWidth.
Put the following code in the AfterUpdate event of txtWidth:

Private Sub txtWidth_AfterUpdate()
Me!txtNumWidth = FracToNum(Me!txtWidth)
End Sub

Or, if you want to *store* the 12 15/16 text string in your table, change the
datatype of the Width field (or fields, if you really insist on using a VERY
BADLY FLAWED design) from Number to Text; you can *display* the decimal size
by setting the control source of a textbox (unbound) to

=FracToNum([txtWidth])

However, I'd stick with the number field in your table - one width and one
height per record NOT 41 of them! You're using a relational database, not a
spreadsheet!

John W. Vinson [MVP]
 
S

Steve

Kevin,

I offered to help you and you let Douglas Steele sway you from the
opportunity of getting the help you want!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
J

John Marshall, MVP

So you admit that you were abusin these newsgroups by soliciting?

John... Visio MVP (Copenhagen)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top