input data 78 must cutted to 70

  • Thread starter Thread starter ron
  • Start date Start date
R

ron

Please give me a push in the right direction
On a form with source TblHarbourcost
fields
Dues
Pilotage
Tugs

I have to fill in the length of a vessel
Tried to use a combobox with source code TblPilotage
for the right tariff
If the vessel is for example 71 mtrs or 79 mtrs long
it has to take the tariff of Pilotage-id 2 ie 70 mtrs $140

TblPilotage
fields
pilotage-id length tariff
1 60 $120
2 70 $140
3 80 $160
aso

The result has to be stored in Tblharbourcost!Pilotage

Thanks in advance for your help
Ron
 
ron said:
Please give me a push in the right direction
On a form with source TblHarbourcost
fields
Dues
Pilotage
Tugs

I have to fill in the length of a vessel
Tried to use a combobox with source code TblPilotage
for the right tariff
If the vessel is for example 71 mtrs or 79 mtrs long
it has to take the tariff of Pilotage-id 2 ie 70 mtrs $140

TblPilotage
fields
pilotage-id length tariff
1 60 $120
2 70 $140
3 80 $160
aso

The result has to be stored in Tblharbourcost!Pilotage

It looks like you could do this:

Add a text box for the length (call it Length) and
in the Data Source for the text box Pilotage put:

=DLookup("Tarriff", "TblPilotage", "[LENGTH] = " & Int([Length] / 10) * 10)

Tom Lake
 
Thanks Tom that will do

How do I get the result of the textbox Pilotage in the field
pilotagetariff in another TblHarbourcost ??


Ron

Tom Lake schreef:
ron said:
Please give me a push in the right direction
On a form with source TblHarbourcost
fields
Dues
Pilotage
Tugs

I have to fill in the length of a vessel
Tried to use a combobox with source code TblPilotage
for the right tariff
If the vessel is for example 71 mtrs or 79 mtrs long
it has to take the tariff of Pilotage-id 2 ie 70 mtrs $140

TblPilotage
fields
pilotage-id length tariff
1 60 $120
2 70 $140
3 80 $160
aso

The result has to be stored in Tblharbourcost!Pilotage

It looks like you could do this:

Add a text box for the length (call it Length) and
in the Data Source for the text box Pilotage put:

=DLookup("Tarriff", "TblPilotage", "[LENGTH] = " & Int([Length] / 10) * 10)

Tom Lake
 
ron said:
Thanks Tom that will do

How do I get the result of the textbox Pilotage in the field
pilotagetariff in another TblHarbourcost ??

You don't want to store the tariff in the TblHarbourcost table
do you? If so, you don't need to. Just calculate it on the fly
whenever you need it.

Tom Lake
 
Tom

To call a port there are many tariffs such as tugboat, linesmen,
customs a.so.,
pilotage is only one item of many
What I need is to store all data on that form for later use, such as
printing a report


I can't figure out how to store the result because I already used the
Source code
with your statement.

Thanks in advance for your help
Regards
Ron
 
Tom
To call a port there are many tariffs such as tugboat, linesmen,
customs a.so.,
pilotage is only one item of many
What I need is to store all data on that form for later use, such as
printing a report

You can put the formula right on a report as you need it.

Tom Lake
 
Back
Top