PDA

View Full Version : Visual Basic Code to Append Table Exported from Monarch to Microsoft Access Database



MorseB
October 10th, 2003, 10:36 AM
How do you write code to append table to an existing Microsoft Access database instead of having the database overlayed?

I can do this from within Monarch by selecting the append (add data to existing file) instead of overwrite existing file.

Sample Code follows:

***

Private Sub cmd_PrepareDailyBookBal_Click()
Dim stappname As String

MsgBox "Monarch will now start and run model (DAFR8920DlyBookBal.mod) to create the DAFR8920Daily.mdb database for creating the daily book balances for importing. Monarch will prompt you for a user id before starting. Your user id is the same as your Novell network usder id (e.g., morseb)."

stappname = "J:MonarchprogramMonarch.exe reas_recpt_nt2
ecpt.ftpmainftp8920BANK reas_recpt_nt2d
econwinmonarchDAFR8920DlyBookBal.mod reas_recpt_nt2DImportDataDownloadDafr8920DailyTabl eTest.mdb /s"
stappname = "J:MonarchprogramMonarch.exe reas_recpt_nt2
ecpt.ftpmainftp8920BANK reas_recpt_nt2d
econwinmonarchDAFR8920DlyBookBalPM.mod reas_recpt_nt2DImportDataDownloadDafr8920DailyTabl eTest.mdb /s"
Call Shell(stappname, 1)

End Sub

***

Thanks for the help.

RalphB
October 10th, 2003, 02:15 PM
Originally posted by MorseB:
How do you write code to append table to an existing Microsoft Access database instead of having the database overlayed?

I can do this from within Monarch by selecting the append (add data to existing file) instead of overwrite existing file.

Sample Code follows:

***

Private Sub cmd_PrepareDailyBookBal_Click()
Dim stappname As String

MsgBox "Monarch will now start and run model (DAFR8920DlyBookBal.mod) to create the DAFR8920Daily.mdb database for creating the daily book balances for importing. Monarch will prompt you for a user id before starting. Your user id is the same as your Novell network usder id (e.g., morseb)."

stappname = "J:MonarchprogramMonarch.exe reas_recpt_nt2
ecpt.ftpmainftp8920BANK reas_recpt_nt2d
econwinmonarchDAFR8920DlyBookBal.mod reas_recpt_nt2DImportDataDownloadDafr8920DailyTabl eTest.mdb /s"
stappname = "J:MonarchprogramMonarch.exe reas_recpt_nt2
ecpt.ftpmainftp8920BANK reas_recpt_nt2d
econwinmonarchDAFR8920DlyBookBalPM.mod reas_recpt_nt2DImportDataDownloadDafr8920DailyTabl eTest.mdb /s"
Call Shell(stappname, 1)

End Sub

***

Thanks for the help.

RalphB
October 10th, 2003, 02:17 PM
Originally posted by RalphB: You can append to existing files using the JetExport command which is available in Monarch version 6 Pro and above. For complete details on the JetExport command which can be used to export tables or summaries see the Programmers Guide.

[/size]
quote:[/size]Originally posted by MorseB:
How do you write code to append table to an existing Microsoft Access database instead of having the database overlayed?

I can do this from within Monarch by selecting the append (add data to existing file) instead of overwrite existing file.

Sample Code follows:

***

Private Sub cmd_PrepareDailyBookBal_Click()
Dim stappname As String

MsgBox "Monarch will now start and run model (DAFR8920DlyBookBal.mod) to create the DAFR8920Daily.mdb database for creating the daily book balances for importing. Monarch will prompt you for a user id before starting. Your user id is the same as your Novell network usder id (e.g., morseb)."

stappname = "J:MonarchprogramMonarch.exe reas_recpt_nt2
ecpt.ftpmainftp8920BANK reas_recpt_nt2d
econwinmonarchDAFR8920DlyBookBal.mod reas_recpt_nt2DImportDataDownloadDafr8920DailyTabl eTest.mdb /s"
stappname = "J:MonarchprogramMonarch.exe reas_recpt_nt2
ecpt.ftpmainftp8920BANK reas_recpt_nt2d
econwinmonarchDAFR8920DlyBookBalPM.mod reas_recpt_nt2DImportDataDownloadDafr8920DailyTabl eTest.mdb /s"
Call Shell(stappname, 1)

End Sub

***

Thanks for the help. [/size]