A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Eval Question



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2004, 04:03 PM
Turner
external usenet poster
 
Posts: n/a
Default Eval Question

I am trying to call a function using a variable. I
attempted the following code but I am getting an error:

"2425 The expression you entered has a function name that
Microsoft Access cann't find".

Public Function myStuff()

Dim stMsg As String
stMsg = "MyMsg()"

Eval (stMsg)

End Function

Public Function MyMsg()

msgbox "I am here"

End Function

Thanks!!


  #2  
Old June 10th, 2004, 01:47 PM
ka
external usenet poster
 
Posts: n/a
Default Eval Question

Hi,

I copied your code directly into an Access module and tried, it works on my
side....
Could it be your Ms Access installation?

Try on another computer.

Cheers

ka


"Turner" wrote in message
...
I am trying to call a function using a variable. I
attempted the following code but I am getting an error:

"2425 The expression you entered has a function name that
Microsoft Access cann't find".

Public Function myStuff()

Dim stMsg As String
stMsg = "MyMsg()"

Eval (stMsg)

End Function

Public Function MyMsg()

msgbox "I am here"

End Function

Thanks!!




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.