Check box

B

bob

Once again thank you for the help. here is my next problem I have two
different type of drivers and they get two different rates of pay based on
mileage.

Driver A : has a rates of .37 cents
Driver B : has a rates of .39 cents

I have in a form already is
Start mileage 1000
Finish Mileage 1050
Total Mileage 50
Total Pay $ 18.50 Driver A
Total Pay $19.50 Driver B

What im trying to do is have a check box that if it is not check then it
will pay at the Driver A rate and show that value and then if it is checked
then it will use the Driver B rate In the same box.

Thank for the help
 
F

fredg

Once again thank you for the help. here is my next problem I have two
different type of drivers and they get two different rates of pay based on
mileage.

Driver A : has a rates of .37 cents
Driver B : has a rates of .39 cents

I have in a form already is
Start mileage 1000
Finish Mileage 1050
Total Mileage 50
Total Pay $ 18.50 Driver A
Total Pay $19.50 Driver B

What im trying to do is have a check box that if it is not check then it
will pay at the Driver A rate and show that value and then if it is checked
then it will use the Driver B rate In the same box.

Thank for the help

Using an Unbound text control on the form, set it's control source to:
=[FinishMileage] - [StartMileage] * IIf([CheckBox = -1,
[DriverBRate],[DriverARate])
 
B

bob

I did try this and it is not working, First thing is that i added a check box
from the tool box and then created two fields in the table as DriverARate and
DriverBRate here is what I did in the control source of a unbound text field.
=[Finish mileage]-[Start
Mileage]*iff([check255=-1,[DriverARate],[DriverBRate])
and it shows #Name in that field. I tried putting in spaces where it looked
like it needed it but they were taken out.

Also the two fields that i made for Driver A and B I put in a default value
of .37 and .39 i was jkust going to hide them in the form. that way no one
can change it easily.


fredg said:
Once again thank you for the help. here is my next problem I have two
different type of drivers and they get two different rates of pay based on
mileage.

Driver A : has a rates of .37 cents
Driver B : has a rates of .39 cents

I have in a form already is
Start mileage 1000
Finish Mileage 1050
Total Mileage 50
Total Pay $ 18.50 Driver A
Total Pay $19.50 Driver B

What im trying to do is have a check box that if it is not check then it
will pay at the Driver A rate and show that value and then if it is checked
then it will use the Driver B rate In the same box.

Thank for the help

Using an Unbound text control on the form, set it's control source to:
=[FinishMileage] - [StartMileage] * IIf([CheckBox = -1,
[DriverBRate],[DriverARate])
 
F

fredg

[Finish mileage]-[Start
Mileage]*iff([check255=-1,[DriverARate],[DriverBRate])


You (and I) left off a closing bracked=t around the Check box name.
Also, the function name is IIF not IFF.

=[Finish mileage]-[Start Mileage] * IIf([check255] =-1,
[DriverARate],[DriverBRate])
 
B

bob

Thank you
I knew it was something stuip on my part that Iff

fredg said:
[Finish mileage]-[Start
Mileage]*iff([check255=-1,[DriverARate],[DriverBRate])


You (and I) left off a closing bracked=t around the Check box name.
Also, the function name is IIF not IFF.

=[Finish mileage]-[Start Mileage] * IIf([check255] =-1,
[DriverARate],[DriverBRate])
 

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