Combo box adds to text box

nightmaregenerator

Registered User.
Local time
Tomorrow, 09:50
Joined
Dec 11, 2009
Messages
33
I have a form that basically allows us to record where a driver went whether they did a return trip and how many kilometers they are charged for.

So basically what I can't seem to figure out is how to the kms to automatically come up when I select the destination.

It's basically set up with a table that has four columns with

From, To, Return and Kms.

In my form I have a combo box that allows you to select the the trip it was.
But what I need is for when I select the trip it automatically adds the kms traveled to the kms text box.

I know it's probably a really simple solution but I can't seem to figure it out.

Any ideas?
 
The information supplied for the database does not specify the kms separately for each return load.

And because there are so many possibilities for destinations working out each leg can be difficult.
 
Sorry if I have confused you, I do have the data stored in another table with the departure destination, the to destination and the optional return trip destination with the kms stores in the next coloum so it looks something like this:

ID From To Return Kms
1 Brisbane Brookstead Sydney 1150

So what I want is when I select this trip in the drop down list I want in the separate kms field to automatically pick up it is 1150kms.

Hopefully this clarifies what I want. :D
 
With this said, is there anyway to refer to another field, then be able to use that refrence in a sum so if I wanted to create another field that times the load size (that refers with =[SingleDouble].[Column](2)) to the kms travels (=[Destination].[Column](4)) in an unbound control?

Or is this impossible, from what I have tried it just returns #Error
 
txtBoxAnswer = txtBoxOne + txtBoxTwo

Oh right yes, I even learnt that in school

I have used the code that was used in the video auto fill the text boxes but I found when the value was auto filled with a decimal place it didn't appear, is that becasue I need to declaire that it's not just a normal number but a decimal?

I have also found a problem, I continued to use this to work the gross and the allowance each person gets but the value always is deleted. Is there a way that it will keep the value?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom