germandeli
Programmer
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
.........
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
.........