This did not work either.
The table I'm trying to update is a linked Microsoft Excel table. Are there limitations to read/write access to a linked Microsoft Excel table wint using a connection string? How else can I update this spreadsheet?
Thanks for your help!
I am trying to loop through a recordset and update a single field by taking out the dashes in the phone number in that field. This is the code I'm using. I am getting the error "Cannot Update. Database or Object is Read Only". I thought the OpenKeyset cursortype and adLockOptimistic lock...
That's a good point. I'm new to VBA, so not sure if this is totally optimized. I thought about using DLookup, but didn't know how to accommodate the max(STAMP_DATETIME) criteria.
Any suggestions?
I may change the other recordset to a DLookup, though, and hopefully it will run faster. It's...
Ok, it figures, after messing with this for 6 hours, finally figured out that the error was from the inner recordset, not the main one. I was troubleshooting the wrong recordset! I incorporated an if statement in case it doesn't find a record and now it works.
Thanks for your help!
Dim...
Thank-you for responding!!!!!
Yes, I used a MoveFirst...here's the beginning of the code...
Dim iPhoneNumber As String
Dim iAmountLoaded As Currency
Dim iAmountBilled As Currency
Dim iUserId As Integer
Dim iCostCtr As String
Dim iBillYear As Integer
Dim iBillMonth As Integer
Dim iEntryBy As...
I can't figure out why I'm getting EOF or BOF error when looping through only a couple of times...
Do While rst.EOF = False
testNo_Rows = rst.RecordCount
iPhoneNumber = CStr(Replace(rst("SUBSCRIBER #"), "-", ""))
iAmountLoaded = rst("SUBSCRIBER TOTAL")
iAmountBilled =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.