Should work as shown (within sub of course). What is actually not "working". Are you getting an actual error or is something not working as expected?
I usually get that error on the date function if one of the references is Missing whether it relates to Date or not. Are any of your selected references listed as Missing? If so, uncheck them and hopefully it should work.
djsiders: I get this error message "Can't find project or library"
cmmrfrds: I get the same error message whether I use Chr$ or Chr.
Pete: No references are checked as missing. Could you please check your reference list in Access and see what file your Visual Basic for Applications points to?
Thanks, Dan.
OK guys, I don't get it. I tried it again this morning and the Chr(13) "carriage return" worked as it should. I did not change any references, just closed the database yesterday and restarted it today. Yesterday, prior to the problems, I had converted the database from Access 97 to Access 2000. But thank you for all your comments! Dan.
Sometimes strange things happen. I recently had a problem with a load of MS Word code that worked fine, then one day I got automation errors and nothing would work. I rebooted etc and it made no difference. I tried a day later and it worked as it should. Goes to show that the solution to some problems is a good nights sleep!
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.