Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Old Access (.mdb)

Post Reply
manlug
Posts: 10
Joined: Fri Jun 29, 2012 10:08 am

Old Access (.mdb)

Unread post by manlug »

You can do the same for Access 2000 (. Mdb) ?
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: Old Access (.mdb)

Unread post by admin »

manlug,

Give this a try..
A2N2000.zip
(107.52 KiB) Downloaded 1265 times
Steven
manlug
Posts: 10
Joined: Fri Jun 29, 2012 10:08 am

Re: Old Access (.mdb)

Unread post by manlug »

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 1250 times
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: Old Access (.mdb)

Unread post by admin »

manlug,

Thanks for all your effort!

Steven
Post Reply