yan5g5i0
KLASA A
Dołączył: 22 Kwi 2011
Posty: 84
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: England
|
Wysłany: Wto 4:44, 17 Maj 2011 |
|
|
*******CODE*******
Dim root As String
Dim srcDB As database
Dim tdf As TableDef
Dim x As Integer
Root = “C:\”
Set srcDB = OpenDatabase(basis)
For Each tdf In srcDB.TableDefs
x = 0
If (tdf.Name = "CULVERT") Then
DoCmd.TransferDatabase acImport, "Microsoft Access",[link widoczny dla zalogowanych], root,[link widoczny dla zalogowanych], acTable, "CULVERT",air jordan 13 How To Unlock A Wii Console,[link widoczny dla zalogowanych], "CULVERT"
errorCheck = 1
End If
Next tdf
‘******************
After the variable declarations, the first line of code sets the variable “root” equal to “C:\” which namely the position of the outer database holding the tables we hope to import. The next line sets our database variable equal to the outer database. The next lines of code quest via the external database to detect the table named “CULVERT.” If this table namely found,[link widoczny dla zalogowanych],[link widoczny dla zalogowanych], the table namely imported using the DoCmd function. The “acImport” variable simply tells the function namely we wish to import message from the database. “Microsoft Access” specifies the type of database containing the table. Following that is the direcotry location (“root”) of the external database. The variable actable specifies that the object we wish to import is a table. The next 2 strings involve the table label to import and the label to ascribe to the imported table when it is imported into the present database. It ought be famous that if the table named to be imported already exists in the current database, MS Access ambition automatically rename the table creature imported.
Once the desired tables have been imported, they tin be utilized just favor whichever of the additional tables in the database.
Post został pochwalony 0 razy
|
|