What version are you using? Be sure that you have "Visual Basic for Application", "Microsoft Visual Basic For Application Extensibility x.x", and "Microsoft Access x.0 Object Library" all checkmarked.
If you include some other code from different developers, you may also have other types of issues with ambiguity, thus in VBA, it wouls also be a good idea to prequalify your methods/properties/objects/variables. Example of this would be as follows:
VBA.Strings.Left([myfld],2)
Note, "Left" function (or Method) is in "Strings" class which is in "VBA" library, which can also be located via the Object Browser in VBA Editor.
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000