Results 1 to 4 of 4

Thread: Import / Export data

  1. #1

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Import / Export data

    I am currently trying to import and export data to some external file that preferably is made as required but I want to use SQL if possible to read it (and make it would be nice).

    I am useing Access 2000 and some PCs may use 2003 any ideas / help / code snippits?
    ?
    'What's this bit for anyway?
    For Jono

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Search the forums for other posts I made :

    Functions to read up on:
    Open <filename> for <type of open> as <channel>
    Close <channel>
    Print #<channel>,<string>
    Line input #<channel>,<stringbuffer>


    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774
    Thanks.

    I've been fishing about and came up with this:
    VB Code:
    1. Private Sub MakeFile(CalledThis)
    2. 'This sub is called to create an mdb file to store the data in.
    3. Dim AccessApp As Access.Application
    4.  
    5. On Error GoTo SameName
    6.    
    7.     Set AccessApp = New Access.Application
    8.    
    9.     With AccessApp
    10.       .NewCurrentDatabase CalledThis
    11.     End With
    12.    
    13. GoTo SkipThis
    14. SameName:
    15.     If Err.Number = 7865 Then
    16.     MsgBox "ALERT: There is already a file with the name: " & vbCrLf & """" & CalledThis & """" & vbCrLf & "and the system is trying to use it." & vbCrLf & vbCrLf & "If this file is important please move it now.", vbCritical, "Name error"
    17.     End If
    18. SkipThis:
    19. End Sub

    Which has worked nicely.

    however the import section has me stuck now... but it's a SQL issue.
    ?
    'What's this bit for anyway?
    For Jono

  4. #4
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    ?

    So what do you need?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width