Results 1 to 3 of 3
  1. #1
    compooper is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    87

    Question Link tables

    Hi, I'm really hoping someone could help guide me in coding this.

    I have many invoices coming from various companies. I would like to merge all of the invoices by extracting selected information, & adding fields that would explain company name and invoice period.

    After doing a lot of research, I've come up with a different importing approach.
    Here's the new idea folks:
    1. Run a TransferSpreadsheet using acLink to link to the spreadsheet/csv file.


    2. Run an Append query to append the records from the linked table to the merged invoice table. Run queries: add fields, extract fields from invoice, etc.
    3. Delete the link to the spreadsheet/csv file.

    I read somewhere that this reduces bloating of your db, if you link the tables and then delete them.
    I just need to know how
    a) temporary link tables
    b) extract and add information I need
    c) merge the data to a table in my db

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You've been told in other threads that you should fix your design problems. Also, I have requested you post your problem code, but you haven't. Without detailed info, it is hard to suggest anything more that general suggestions.

    Have you changed your structure?
    Do yo think you will post your problem code?

  3. #3
    compooper is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    87
    Hi,

    I have change my table structure. What I will be doing from now on is:
    1 table for all of the invoices, where there will be a field that determines which Company each record belongs to, using many to many relationships

    So the problem now is to get the CompanyID, which the user selects in the form, to append only to the new records being linked.

    The code, probably won't help at all, but its an attempt:
    Private Sub cmdUpload_Click()
    If Me.cboCompany = 1 And Me.cboInvType = 2 Then
    DoCmd.TransferText acLinkDelim, , "tblInvoices", Me.txtPath, False

    Else
    MsgBox "Error!!"
    End If
    End Sub

    So in that code: I'll have if statements for each company selection
    I need to add the process:
    - add companyname to only those records that are being currently imported
    - delete the link table once its been imported to the table in the database

    Hope this clarify things

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Trying to Link tables
    By brandonze in forum Access
    Replies: 1
    Last Post: 05-19-2011, 11:03 PM
  2. how to link 3 tables?
    By handsome1855 in forum Access
    Replies: 1
    Last Post: 03-10-2011, 09:25 AM
  3. One-way link between tables
    By Mikele di Sagitter in forum Database Design
    Replies: 1
    Last Post: 07-23-2010, 08:26 AM
  4. How do I link existing tables?
    By jsbdiver in forum Programming
    Replies: 0
    Last Post: 05-24-2010, 02:53 PM
  5. Best way to link tables together?
    By marleyuk in forum Access
    Replies: 1
    Last Post: 06-07-2009, 08:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums