Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 19th, 2007, 09:31 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default rst.AddNew to a Linked Table

Hi Gang

I'm having a little trouble getting a form to add a record to a linked table based on certain criteria. Basically if you select something from a combo box it will transfer the data to another table in a different database. The table in question is linked to the current DB but I can't get the code to run.

Any one have any answers


 
Old December 19th, 2007, 11:46 AM
pjm pjm is offline
Authorized User
 
Join Date: Jul 2006
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As far as adding data to a linked table, it should act the same way as a regular table in the same database. Make sure that the other database file is not marked as read-only. The link or the underlying table may also have some permissions set that are interfering. The most common problem I have found is if you are updating the table thru a query. Often when the query involves a join with another table it renders the whole thing not updateable.

-Phil-
 
Old December 20th, 2007, 08:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Another issue may be how you are updating. If you are making a seperate call to the database without going through the linked table, then there could be issues there as well, especially with the data provider. Otherwise "it should act the same way as a regular table in the same database," joined queries notwithstanding.



mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old January 8th, 2008, 10:54 PM
Registered User
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to faridrd
Default

Hmm not very sure if you have already solved this problem, I encountered this problem before. If you are using DAO recordsets you might want to check dbSeeChanges argument.

set rs = db.openRecordSet("bla bla bla",dbOpendynaset,dbSeechanges)
//open a query of table of dynamic type
if you open a table normally usually it would be a static table and you wont be able to seechanges.

If you are using ADO like I currently using right now you might not encounter this problem.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Rst.BOF And Rst. EOF question jpaul VB Databases Basics 2 November 14th, 2007 05:56 PM
Can a Make Table Query produce a Linked table? kronik Access 5 May 16th, 2006 06:17 AM
Linked Table sdilucca Access 1 February 24th, 2006 07:29 AM
Update linked table penta Access 2 September 28th, 2004 07:58 AM
linked table Tasha Access VBA 1 August 6th, 2004 03:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.