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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tables to Query to Form +More Stuff to New Table 2

Status
Not open for further replies.

Freckles

Technical User
May 1, 2000
138
US
I think I am having a brain hiccup here!

I want to summerize and perform calculations on data from a table of 15,000+/- lines in a query. Then base a form on that query. Then, in the form, add narrative based on the manipulations. Then store everything on the form in another table. AND I am drawing a complete blank on the best way to do this.

There will be no problem in keying the new table, and it will only have about 30 lines.

I FEEL LIKE A BIG duhhhhhhhhhhhhh! [3eyes] ::) Deb Koplen
deb.koplen@verizon.com
koplend@swbell.net (weekends and nights)

A person can stand almost anything except a succession of ordinary days.
 
Use the second form only. Bind the data of the second table to the second form. Then on some event, add the folloing code.

me.field1 = dsum("oldfield","oldtable", "criteria)

fill all the fields thusly.

This the heart of the process. Not the only way but a way.

rollie@bwsys.net
 
Thanks for the response. However, I don't see what you mean by the second form. ::) Deb Koplen
deb.koplen@verizon.com
koplend@swbell.net (weekends and nights)

A person can stand almost anything except a succession of ordinary days.
 
When do you wish to see that second table? I assumed in a second form.

All the data bound to a form may be addressed as:

dim rs as dao.recordset

set rs = me.recordsetclone


That is a copy of all the data in a bound form. Does that help you visualize what you wish to do.

If you want data that is not bound, you can do the same with this as the code.

set rs = currentdb.openrecordset( SQLstr)

where SQLstr is "SELECT ...FROM... WHERE...;"


rollie@bwsys.net
 
I will be printing a report from the second table to be included in a large document. I want the data in a table so that an audit trail can be maintained over a long period. ::) Deb Koplen
deb.koplen@verizon.com
koplend@swbell.net (weekends and nights)

A person can stand almost anything except a succession of ordinary days.
 
Write an INSERT SQL to add the data to the new table. F1 help will show you how. It is something like...

INSERT INTO NuTable, fields(0),fields(1)... VALUES
(value1,value2);"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top