wirelad said:
Hello,
Its was recommended to me - I make a temp table to store some field data
in.
How do you make a temp table?
I have a form that calculates data and I'm trying to create a chart based on
this data.
The problem is, you can only create a chart from a table or query.
SO!
How can I send data back to a table from a form - only for the current form
data.
Please - anyone any ideas...HELP!
Sorry
WiReLaD
To answer your original question.
Create the temporary tables just like you would create any other table.
They call these temporary table because the data in the table is temporary.
Then in your code do the following to delete all of the records in the
two tables
Dim dbs As Database
Dim SQLString as string
Set dbs = CurrentDb
dbs.Execute "DELETE * FROM tmpTable1;"
dbs.Execute "DELETE * FROM tmpTable2;"
Then in your code when it is time to add data to the tables, do the
following
SQLString = "INSERT INTO tmpTable1 ( TableFieldName1, TableFieldName2)"
SQLString = SQLString & " VALUES (" & Me!LabelValue1.Caption & ", " &
Me!LabelValue2.Caption & ");"
dbs.Execute SQLString
After the two SQLString assignment statements have executed, you will
have one long string of
concatenated information, the keywords for the INSERT instruction and
the variable data from
your Form for the data being inserted into the table.
What other are trying to tell you is:
1. In these Newsgroups a request for an answer needs to be explained in
some detail and be clear.
This will allow others the ability to answer your question without
all of the
What-do-you-mean-by type of replies.
2. It also allows others the option of giving you another approach or a
better approach to solving
your problem.
Hope this helps.
Ron
ps: This is air code.