Share via

Microsoft Access: Compile error in VBA code

Anonymous
2019-12-03T17:21:20+00:00

I am having trouble with Microsoft Access, 

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2019-12-03T22:29:18+00:00

    @Tom,

    While I agree one should use the lowest version the Users have to develop in.  And I also see your point about intellisense, however, I have seen cases where the preset Reference causing an issue if the User had a different version of Office installed.

    Was this answer helpful?

    0 comments No comments
  2. Tom van Stiphout 40,201 Reputation points MVP Volunteer Moderator
    2019-12-03T22:09:12+00:00

    @Gina: I'm not sure I agree. Per best practices the app should be developed in the lowest version of Access (Office) that users may have. References to Outlook and other Office components will then automatically be adjusted (even in ACCDE) if the solution is opened in a higher version.

    Early binding gives you the distinct advantage of intellisense and syntax checking at compile time.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-12-03T19:57:53+00:00

    Hmm, seems like you are using Early Binding which means you must set the Reference to Outlook under Tools > References in the VB Editor.  That said, it would be better to use Late Binding so that your database will work with the version of Outlook loaded.  You can read more about that here...

    https://www.devhut.net/2016/11/08/vba-early-binding-and-late-binding/

    Was this answer helpful?

    0 comments No comments
  4. Dumba_M3 7,200 Reputation points Volunteer Moderator
    2019-12-03T19:03:37+00:00

    Moved from the Community Center to Access.

    Was this answer helpful?

    0 comments No comments