You can set references in code using the AddFromFile or AddFromGUID methods
of the References collection (see, for example,
http://msdn.microsoft.com/library/en-us/vbaac11/html/acmthCreateFromFile_HV05186
713.asp)
but I'd recommend using Late Binding instead, so that you don't need a
reference.
Tony Toews has an introduction to the topic at
http://www.granite.ab.ca/access/latebinding.htm

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> I'm developing a db on my computer access 2k2 that the Microsoft Graph 11
> object but I deploy the db on a access 2K machine. It only has the ms
[quoted text clipped - 6 lines]
>
> Jesper