nvm, sorted it, thanks for the help guys, ur code is working a dream MajP, someday i'll look into what its doing... now i gotaa get onto more complicated stuff *yikes*
have tried the code u suggested MajP (not sure i fully understand what its doing though, lol) and it is getting me my autonumber, thats the good news, thanks.
However, i'm getting an undefined error with no option to debug and nothing but a blank msgbox (even with my error handler in place)...
ok, this is starting to blow my mind.... and not in a good way
'Retrieve last number assigned for "tblCode"
LSQL = "SELECT LstNoAssigned FROM tblAutonumber"
LSQL = LSQL & " WHERE CodeDesc = " & "'tblCode'"
Set lrs = db.OpenRecordset(LSQL)
appears to work, however, using the...
man... i knew it would be something simple!
Awesome, thanks.
just need to get back to solving this no record issue then lol
strange considering there are 2 records in the code table
tbh, i'm a little reluctant to re-write all the code since i almost fully understand the bit i have written, unles ofc it is total garbage.
i have removed the else from the if statement (realised it was just repeating code.
but i now seem to have a different problem.
"Too few parameters...
wow.. that looks alot simpler, not sure i understand some of it though... been nearly a decade since i tried doing this stuff LOL
i'm making my own number because (mainly for flexibility i guess)using Access 2k, as far as i know there is no way to use the Access autonumber with an input mask...
ok ok, i have to appologise here...
have added some watches and it turns out 'tblCodes' defined as an external string input is being used in my SQL statement as True or False... have no idea why so i'm guessing i have even bigger problems here.... sadly
Soz
Hey guys, this was the most useful sounding post that google threw up, so hope i can get some assistance with this same issue - No Current Record error.
Exceled at VB6 at college and programmed several Access dbs using alot of VBA and the need for a db came up and now i'm teaching myself all...
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.