hello...
I want to import table in my application and i want to store it temporary so that i can make calulation
after making calculation that temporary data should be dump
how to implement this program
how to store i/p table temporary in my access vba application
I am new to this....
3 1592
There are several ways of doing this.
You could use the same table each time and simply use a delete query from code when your done with your calculations, or when you close your form, or when you close the application or.....
You could create the table on the fly with VBA code, or again, by using a query, do the import, then delete the table by VBA code or query.
Really it depends on more details about how you want it to function, and how you want to do it. My personal preference is almost always to use VBA, but in the end, you are the one who has to implement it.
Where do you get your temporary data from? Is it always in the same format?
can you tell me how to create temporary table to hold imported data
this table should be dump after entire operation
This is an example of a query that will create a table tbl_Temp and insert data from tbl_User: - SELECT tbl_User.PK_User,
-
tbl_User.tx_UserInitials INTO tbl_Temp
-
FROM tbl_User;
Another example creating the table by code: - Public Sub generateExportTable(strTableName As String, Optional bHazards As Boolean = False)
-
'This procedure creates a temporary table to be used in a report or to be exported for review
-
-
'If teh table allready exists, delete it
-
If TableExists(strTableName) Then
-
DoCmd.DeleteObject acTable, strTableName
-
End If
-
-
-
'Create the table
-
Dim tblDef As TableDef
-
Dim db As Database
-
Set db = CurrentDb
-
Set tblDef = db.CreateTableDef(strTableName, , , CurrentProject.Connection)
-
Dim fld As Field
-
-
-
With tblDef
-
If bHazards Then
-
.Fields.Append .CreateField("lngSortNumber", dbLong)
-
.Fields("lngSortNumber").Attributes = dbAutoIncrField
-
End If
-
.Fields.Append .CreateField("lngReqID", dbLong)
-
.Fields.Append .CreateField("txtSectionNumber", dbText, 50)
-
.Fields.Append .CreateField("txtType", dbText, 20)
-
.Fields.Append .CreateField("txtRevision", dbText, 10)
-
.Fields.Append .CreateField("memSpecifikation", dbMemo)
-
If bHazards Then
-
.Fields.Append .CreateField("Comments", dbMemo)
-
.Fields("Comments").AllowZeroLength = True
-
.Fields.Append .CreateField("Hazard nr", dbMemo)
-
.Fields("Hazard nr").AllowZeroLength = True
-
.Fields.Append .CreateField("Hazards", dbMemo)
-
.Fields("Hazards").AllowZeroLength = True
-
End If
-
-
End With
-
-
tblDef.Fields("txtSectionNumber").AllowZeroLength = True
-
' Append the new TableDef to the database.
-
db.TableDefs.Append tblDef
-
End Sub
Not all of the above code is required, some is specialized for my need, but this gives you an example.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Boban Milenkovic |
last post by:
hi,
i have a sql2000 server and several msde-clients, which use the merge
replication.
if i import data from a text file using the dts-import wizard, the
newly imported data will not be...
|
by: yee young han |
last post by:
I need a fast data structure and algorithm like below condition.
(1) this data structure contain only 10,000 data entry.
(2) data structure's one entry is like below
typedef struct _DataEntry_...
|
by: gtux |
last post by:
Hi everybody:
I'm new in Javascript, I found some code and there is this:
var fruit =
{
'apple' : { 'weight' : 10, 'cost' : 9},
'peach' : { 'weight' : 19, 'cost' : 10}
}
|
by: ccr |
last post by:
Please view in a text editor so that the columnar text lines up. I
used Terminal 9pt font to compose this post and copied/pasted to my
newsreader program.
I am writing in the hope that one of...
|
by: Stewart Allen |
last post by:
Hi there
Opinions on the best way to do this.
I want to import data from an Excel spreadsheet into Access and want the
data to be tested before the tables are updated. At the moment all the...
|
by: Jay |
last post by:
I am importing data on a daily basis and I want to assign a value (A,
B, C, D, or E) to each record for the purpose of evenly distibuting the
data 5 ways so I have the following code:
rst1...
|
by: leo |
last post by:
Hi,
Following is the python scripts:
import marshal
...
|
by: rathikrindanagaraju |
last post by:
hi plz explain what are the data types available in the IBM DB2 database
|
by: laziers |
last post by:
Hi,
What kind of data access you will use for the project with very large
database :
1. NHibernate
2. Linq
3. Sql queries + stored procedures
4. DataSets
|
by: dynamo |
last post by:
We are always being told random binary data cannot be compressed,so i'm wondering what does random data look like.I think it would consist of short runs of 1's and 0's.Any ideas.Thanks
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |