Access will give these errors if any reference is broken, not just the VBA
one.
Not sure what you mean by "disconnecting" the VBA library. It can't be
deselected as a reference in an Access database.
Unregistering it and re-registering it (and the other libraries you are
using) with Windows might help. Use regsvr32. Details:
http://allenbrowne.com/ser-38.html
The problem could also be caused by an ambiguity, e.g. if there is some
other object named Mid. If this is the cause, you may be able to work around
it by explicitly referring to the VBA library in your code, e.g.:
MyVariable = VBA.Mid([FieldName],3,2)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Simon" <Sv********@Versatel.nlwrote in message
news:45**********************@news.tele2.nl...
Dear reader,
The following functions gives me some problems: Mid([FieldName],3,2) and
Left() and Date(). On one pc it works perfect and on the other one an
error
message pop's up "Not a valid instruction". After a disconnecting and than
reconnecting a VBA library, which was not indicated as broken, the command
Mid([FieldName];3;2) works correct.
It looks like a check on broken references is not enough.
Who knows how I can avoid this errors in the Left(), Mid() en Right()
instruction.
Thanks for any help,
Simon