Old Access (.mdb)

Old Access (.mdb)

Postby manlug » Fri Aug 31, 2012 8:06 pm

You can do the same for Access 2000 (. Mdb) ?
manlug
 
Posts: 10
Joined: Fri Jun 29, 2012 5:38 pm

Re: Old Access (.mdb)

Postby admin » Mon Sep 03, 2012 10:31 am

manlug,

Give this a try..

A2N2000.zip
(107.52 KiB) Downloaded 741 times


Steven
admin
Site Admin
 
Posts: 1886
Joined: Mon Jun 15, 2009 9:53 am

Re: Old Access (.mdb)

Postby manlug » Tue Sep 04, 2012 10:30 pm

I modified A2N2000.mdb for initial errors in my system.

Module: NuFunctions
Code: Select all
Function makeObjectTable(pFormName As String, pNewTable As Boolean)
...
'DoCmd.RunSQL "INSERT INTO nuObjects (ob_form, ob_name, ob_type, ob_label, ob_top, ob_left, ob_primary, ob_foreign, ob_datatype, ob_tabindex) VALUES (" & Join(V, ",") & ")"
            strSQL = "INSERT INTO nuObjects (ob_form, ob_name, ob_type, ob_label, ob_top, ob_left, ob_primary, ob_foreign, ob_datatype, ob_tabindex) VALUES (" & Join(V, ",") & ")"
            CurrentDb.Execute strSQL
...

And DAO.Recorset
Code: Select all
Function buildTableSQL(pTableName As String) As String
...
'==========INSERT RECORDS
Dim rst As DAO.Recordset, atLeastOneRecord As Boolean
ReDim RW(0 To 0) As String
...

Function addForm(pAccessFormName As String)
...
'----add browse fields
Dim rst As DAO.Recordset, rCount As Integer
...

Function buildFormObjects(pFormID, pAccessFormName As String, pIsSubform As Boolean)
Dim rst As DAO.Recordset, rCount As Integer
...


Form: Converter (problem with create file)
Code: Select all
Private Sub write_to_file()
    Const ForReading = 1, ForAppending = 8
    Const TriStateUseDefault = -2, TriStateTrue = -1, TriStateFalse = 0
    '
    Set fs = CreateObject("Scripting.FileSystemObject")
    pPath = InputBox("Save To :", , "c:\" & Format(Now(), "hhnnss") & ".sql")
    Set A = fs.CreateTextFile(pPath, True)
    A.Close
    'Open pPath For Output As #1
    Set A = fs.opentextfile(pPath, ForAppending, TriStateUseDefault)
   
    build_tables
    build_reports
    build_forms
   
    SQLstring = SQLstring & vbCrLf & "DROP TABLE IF EXISTS nu_temp_table;" & vbCrLf
    SQLstring = SQLstring & vbCrLf & "CREATE TABLE nu_temp_table (nu_temp_table_id text(100), ntt_code text(100),  ntt_description text(100));" & vbCrLf
    SQLstring = SQLstring & vbCrLf & "DELETE FROM nu_temp_table;" & vbCrLf
    SQLstring = SQLstring & vbCrLf & "INSERT INTO nu_temp_table (nu_temp_table_id, ntt_code,  ntt_description) VALUES ('1234', 'unknown table name', 'unknown table name');" & vbCrLf
    'Print #1, SQLstring
    A.Write SQLstring
    'Close #1
    A.Close
    Exit Sub
ErrorHandler:
MsgBox vbObjectError
End Sub
Attachments
A2N2000_modif.zip
A2N2000 modif
(22 Bytes) Downloaded 715 times
manlug
 
Posts: 10
Joined: Fri Jun 29, 2012 5:38 pm

Re: Old Access (.mdb)

Postby admin » Wed Sep 05, 2012 10:55 am

manlug,

Thanks for all your effort!

Steven
admin
Site Admin
 
Posts: 1886
Joined: Mon Jun 15, 2009 9:53 am

Re: Old Access (.mdb)

Postby AyanPrince » Wed Apr 15, 2015 4:31 pm

Thankx dear nice post realy
AyanPrince
 
Posts: 1
Joined: Wed Apr 15, 2015 4:30 pm


Return to MS Access to nuBuilder Converter