By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,251 Members | 1,648 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,251 IT Pros & Developers. It's quick & easy.

2 forms

P: n/a
Tom
I totally new to Access.
I created 2 forms with a button on the main form to call up the second, e.g.
mileage exp.
I have an expression on the second form to subtract start and finish
mileage, I want the result to display on the main form.
My difficulty is, the result from the second form will appear in the correct
field but in all the records on my main form. I have set up relationships
from the result field on the second form to the field on my main form. I
also used the OnCurrent expression.
I would like to link the correct fields to the correct records and I don't
really want to create a sub-form because it shows on the main form and gives
a cluttered look.
If possible I would like to have a save button that would close the second
form so I can continue entering data before moving onto the next record,
with the mileage exp field empty.
I trawled through the help, maybe I don't know how to phrase the correct
question.

Many Thanks in advance
Tom Brett
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I'm not totally sure what your second form does, but it sounds to me
like it's only calculating total mileage. You could easily perform
the calculation on your main form. If the mileages are in your record
set for the form, all you would need to do is put =EndMileage -
StartMileage in the box on your main form where mileage is calculated.
If not you could use other methods, like DLookup. The reason you are
getting the same result for all the records on the main form is
because the field on the main form is not bound to anything. I hope I
helped you somewhat.
Nov 13 '05 #2

P: n/a
Tom
Hello Jeff
I Thank you so much for your time and input.
You are correct about the second form, it only calculates mileage.
I will try to bind the calculated mileage field first, if this fails me I
will go with your suggestion and perform the calculation on the main form.

Renewed Thanks
Tom
"Jeff Leckrone" <jl*******@hotmail.com> wrote in message
news:e2**************************@posting.google.c om...
I'm not totally sure what your second form does, but it sounds to me
like it's only calculating total mileage. You could easily perform
the calculation on your main form. If the mileages are in your record
set for the form, all you would need to do is put =EndMileage -
StartMileage in the box on your main form where mileage is calculated.
If not you could use other methods, like DLookup. The reason you are
getting the same result for all the records on the main form is
because the field on the main form is not bound to anything. I hope I
helped you somewhat.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.