day of week expression

G

Guest

Howdy,

Context - I have staff choosing a day of the week for a class. Then there
is a lot of other information as well. For example, length, teacher costs,
etc... The issue I am having is that some of the classes meet more than once
a week. So, when I do the expression (or calculation) I need to be able for
the expression to know if they choose MWF that is should be multiplied by 3
or T/TH by 2, etc... I have looked a some Row Source things but can't seem
to find an expression that works.
Thanks.
 
J

Jeff Boyce

What should be multiplied by 3?

Is this happening in a form?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Jeff,

Thanks for the reply... What I am multipling by 3 is the # of days. For
example, if a class meets 1 day a week, the formula I have to figure out the
"cost" of the class is = facility cost + instructor cost + admin expenses X #
of hour meeting X # of weeks. Right now, I have people choosing a day of the
week so that on a "report" they can print all of this info to "load" into
another system - including what day of the week they choose. The problem is
that sometimes a class meets twice or three times a week. So, I want the
query to "know" that if the choose from a drop-down MWF (for Monday Wednesday
Friday) to multiply the above formula by 3. See below...

Facility cost = $10 an hour
Instructor cost = $20 an hour
Admin Expenses = $5.00 an hour
Meets for 2 hours 1 day a week
Meets for 8 weeks
((10 + 20 + 5) X 2) X 8 = $560

$560 is the "expense" to run the class 1 day a week for 8 weeks. If they
class meets 3 times a week however, the cost goes up to (see below)
(((10 + 20 + 5) x 2) X 3) X 8 = $1680.00

Right now, the formula doesn't know if the class meets more than 1 day a
week.

Thanks.
 
J

Jeff Boyce

It sounds like you need to add code to evaluate what the drop-down holds.
Either a series of If..Else statements or a Select Case... statement...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

Michael Gramelspacher

Howdy,

Context - I have staff choosing a day of the week for a class. Then there
is a lot of other information as well. For example, length, teacher costs,
etc... The issue I am having is that some of the classes meet more than once
a week. So, when I do the expression (or calculation) I need to be able for
the expression to know if they choose MWF that is should be multiplied by 3
or T/TH by 2, etc... I have looked a some Row Source things but can't seem
to find an expression that works.
Thanks.

This may seem odd, but I used a combox with a rowsource of
2;"Mon";3;"Tue";4;"Wed";5;"Thu";6;"Fri";7;"Sat";23456;"Mon-Fri";246;"MonWedFri";35;"TueThu";357;"TueThuSat"

So the stored value for Tuesday and Thursday is 35. So, the
calculation would be: Len(cstr(my_variable)) * per_hour_fee
 
D

Douglas J. Steele

Michael Gramelspacher said:
This may seem odd, but I used a combox with a rowsource of
2;"Mon";3;"Tue";4;"Wed";5;"Thu";6;"Fri";7;"Sat";23456;"Mon-Fri";246;"MonWedFri";35;"TueThu";357;"TueThuSat"

So the stored value for Tuesday and Thursday is 35. So, the
calculation would be: Len(cstr(my_variable)) * per_hour_fee

Why not just have the combo box return the multiplier to use?
 

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