Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is my linked jet table not updatable?

Status
Not open for further replies.

germandeli

Programmer
Aug 18, 2003
1
US
I am converting my Access mdb file to adp and sql server 7.0. I use a lot of VBA. It has been a challenge but most thinks are working now. However I have a linked jet table from another access database that I am having problems with. When I link the table Access makes it a view and it is not updatable. I am using VBA to update the table but get an error "Invalid Object Name [Inventory]" (Inventory is the name of the query). If I import the table everything works well, but since the table is part of another application I can't use an imported copy. I need to share the table. Any help you can provide will be appreciated.

Error occurs on the inventory.update in the next to the last line below:

Dim inventory As New ADODB.Recordset
ShippedOldValue = Me.Ship.OldValue
If Not ShippedOldValue = Me.Shipped Then
inventory.Open "Select * from [Inventory] where [ItemNum] = '" + Me.ProductID + "'", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
If Not inventory.EOF Then
inventory("In_Stock") = inventory("In_Stock") - (Me.Shipped - ShippedOldValue)
inventory.Update
Else
.........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top