Jumat, 25 Mei 2012

RE: [MS_AccessPros] Undefined Function in Expression error

You need to use late-binding for your code to be Office version agnostic, which means no references at all.
All of your code calling other Office applications needs to be changed;
'instead of

dim apOut as outlook.application, you
dim apOut as an Object,

'and then

set apOut=createobject("outlook.application")


any constants would have to be replaced with numbers, like
apOut.GetDefaultFolder(9) would look like this in code that was early bound
apOut.GetDefaultFolder(olFolderCalendar)
decent explanation here:
http://www.dicks-clicks.com/excel/olBinding.htm andhere http://support.microsoft.com/kb/245115

hth
Steve





________________________________
> To: MS_Access_Professionals@yahoogroups.com
> From: luvmymelody@yahoo.com
> Date: Fri, 25 May 2012 16:37:37 +0000
> Subject: [MS_AccessPros] Undefined Function in Expression error
>
>
>
> Hello,
>
> So I have a form that needs a Outlook reference to open and I usually
> work in Access 2010 and it works great. I tried to open it at home and
> I received a Undefined Function in Expression error. I googled it and
> found that I have a missing outlook reference to 14.0 version. So I
> unchecked the reference to 14.0 and changed it to 12.0 and it worked.
>
> How do I get the form to work in both versions of access without having
> to go back and forth in the references?
>
> Thank You
>
> Jim Wagner
>
>
>


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar