Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Multiple Record Calcs for One Account number?

Status
Not open for further replies.

Steven547

Technical User
Sep 15, 2004
165
US
I have a form that displays: Account LastDate CurrentDate and Total Days (lastdate - currentdate).

I want to be able to enter multiple date calculations(this is basically a calculator of sorts) for ONE record. So, for Account # 1, they'll have 5 LINES of "calculations" (Lastdate minus current date = total Days) So, 3 fields per line. If I navigate to record #2, there won't be anything because no calcs have been done...

It would look like this on the form:

Record #1
line 1: enteredDate Date Total Days
line 2: enteredDate Date Total Days
line 3: enteredDate Date Total Days

and Record#2 might not have anything.

Any ideas?

Thanks.
 
So, the "LastDate" is not stored anywhere but on the fly?
Or is the Lastdate actual data in a table? If so, post your table structures. If tables are designed correctly, then a form with a datasheet subform should work.
 
The CurrentDate, LastDate, and Totals are all fields in a table that are stored. Along with Applicant name.
the LastDate is data that is then entered on the fly, along with the CurrentDate. The calc is done from those two fields.
 
Hopefully this attachment works of what I'm looking to do...multiple lines per record...
 
Post your table structures. First, you don't store calculated fields in a table. See:
Fundamentals of Relational Database Design

Taking a guess, you should have at least two tables:
tblAccount
AccountID
Other account fields

tblTransaction
TransID Primary Key
AccountID
LastDate
CurrentDate
etc.

So you'd have a form/subform setup. The main form is based on tblAccount showing AccountID (Name, whatever), the subform can be a continuous form showing LastDate, CurrentDate and a calculated textbox showing Total Days.
The form/subform is connected by AccountID
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top