473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

2 forms

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
2 1077
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
13
by: MD | last post by:
I have been converting a program from VB6 to VB.Net and enhancing it as well. All has been progressing OK although its been hard work. Now, all of a sudden, when I try to execute a ShowDialog()...
15
by: Joshua Kendall | last post by:
I have a script in which it keeps opening the same form instead of only one instance. I also need help with a form that has a password. Where do I put the actual password? can I use a database for...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
3
by: Geraldine Hobley | last post by:
Hello, In my project I am inheriting several forms. However when I inherit from a form and add additional subroutines and methods to my inherited form I get all sorts of problems. e.g. I sometimes...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.