MILEAGE CALCULATION

V

Vic

I have a table calle tbl_MileageRate that has various mileage rates for
companies I deal with.

I have a table called tbl_LoadInfo that has a field called LdMilRteMt. This
field is a combo field and displayes the mileage rates from tbl_MileageRate.
The bound column is 1 which is the carrier ID but what is displayed is column
2 which is the rate information. I also have in this table a field called
LdMilMt which I enter the miles the company is paying for. I have another
field in this table called LdPdMt so I can put how much I'm being paid.

On my form I am trying to find out how to get access to multiply LdMiMt
miles * LdMilRteMt and put that value in LdPdMt after I have enter the miles
in LdMiMt.

My problem is that LdMilRteMt on the form displays the actual rate lets say
..40 which is in column 2. The bound column is 1 which is the carrier name.

How do I get access to automatically muliply LdMiMt * LdMilRteMt (displayed
figure) and put that value in LdPdMt.

Thanks
 
S

S.Clark

In the OnUpdate of both the LdMilRteMt & LdMilMt controls (on the form), add
something like the following:

txtLdPdMt = Nz(cboLdMilRteMt.Column(1)) * Nz(txtLdMilMt)

(I've tacked on prefixes assuming text boxes and combo boxes for the controls)
 

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

Similar Threads


Top