3 forms, one bit of code, use a module?

thanks for the replys guys, i will try and work through the replys and see if i can get it too work ( swamped at work at the moment so not much spare time to work on the DB )

best regards
 
i think ive got that fixed now (
Code:
.Open "SELECT * FROM TBLPacks WHERE PackRef = '" & iPackID & "'", cn, adOpenStatic
with this bit of code ), but when it tryed to update the record i get this error:

runtime error '3251':

current recordset dosent support updating. this may be a limitation of the current provider, or of the selected locktype.

does this mean that the record is open ( in the form ) and that it cant update it because its locked to form?

thanks for all the help guys, hopefuly this will also help a few other people :D

best regards
 
You need to open the recordset and make it editable.
its this line:

Code:
Open "SELECT * FROM TBLPacks WHERE PackRef = " & iPackID, cn, adOpenStatic

Needs to be:

Open "SELECT * FROM TBLPacks WHERE PackRef = " & iPackID, cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic
 

Users who are viewing this thread

Back
Top Bottom