Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Can I use DoCmd.TransferDatabase command in MS Access?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v6 Forum

 New Topic 
 
 Post Reply 
[1]  
 Can I use DoCmd.TransferDatabase command in MS Access? 
 Author   Message 
  mike 
  
 Group: Members 
 Posts: 5 
 Joined: 2006-12-02 
 Profile
 Posted : 2006-12-02 16:21:06

I need access to data from QB, but I am in a multi-user, multi-site enviroment, so I do not want to use a linked table, I can do an ado connect, but I just need the contents of the customer and vendor table refreshed.  The transferdatabase command in access seems like the perfect answer.  Has any one got it it to work, i get hung with the source name. 

Thank you Mike

 

  Top 
  mike 
  
 Group: Members 
 Posts: 5 
 Joined: 2006-12-02 
 Profile
 Posted : 2006-12-02 16:26:28

I am sorry I did not explain in the above post that I am using QODBC to connect to both Enterprise and QbPro.

thank you

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-02 16:35:33

To run the TransferDatabase action in Microsoft Visual Basic, use the TransferDatabase method of the DoCmd object.

This example links the QODBC database table Customer to the current database:

DoCmd.TransferDatabase acLink, "ODBC Database", _
    "ODBC;DSN=QuickBooks Data;LANGUAGE=us_english;" _
    & "DATABASE=pubs", acTable, "Customer", "dboCustomer"

You can use the TransferDatabase action to import or export data between the current Microsoft Access database (.mdb) or Microsoft Access project (.adp) and another database. The TransferDatabase action is similar to pointing to Get External Data or Export on the File menu of the Database window and clicking Import or Link Tables. You can use these commands to select a source of data, such as an Access database or another type of database, a spreadsheet, or a text file. If you select a database, one or more dialog boxes appear in which you select the type of object to import or export (for Access databases), the name of the object, and other options, depending on the database you are importing from or exporting or linking to. The arguments for the TransferDatabase action reflect the options in these dialog boxes.

For Access databases you can also link a table to the current Access database from another database. With a linked table, you have access to the table's data while the table itself remains in the other database.

 

  Top 
  Matt 
  
 Group: Members 
 Posts: 25 
 Joined: 2006-04-25 
 Profile
 Posted : 2007-10-24 03:33:08

DoCmd.TransferDatabase acLink, "ODBC Database", _
    "ODBC;DSN=QuickBooks Data;LANGUAGE=us_english;" _
    & "DATABASE=pubs", acTable, "Customer", "dboCustomer"

 

Where do I type this in Visual Basic? In my the VB code in my Access database somewhere? In VB Demo? Do I create a new table and then type in the code? Will this allow me to cascade update my access tables and enforce referential integrity if a record (such as a customer or item name) changes in Quickbooks? Thanks!

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-10-24 10:06:27
Please refer to your MS Access Help file documentation for further help. 

  Top 
  Matt 
  
 Group: Members 
 Posts: 25 
 Joined: 2006-04-25 
 Profile
 Posted : 2007-10-26 03:32:33
Ok, so that worked by doing a macro, but it looks like there is still no way to establish a relationship with the table from Quickbooks, cascade update, and enforce referential integrity? Any way around this? I wonder if I could run an update or append query based on the List ID column in the linked table if a record like a customer name is changed in Quickbooks... 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-10-26 08:16:15
Yes, the ListID is unique and doesn't change. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to