[AccessD] Eval function

Stephen Bond stephen at bondsoftware.co.nz
Tue Jun 21 15:56:56 CDT 2005


Back in the early releases of Access you could use the @ character to pretty up the default MsgBox display.  The @ character divided the display into 3 separate entities, the first bold, the second two not, each delimited by a blank line.  So, 
MsgBox "File missing at The file FredDagg is missing at Please correct and re-try"
would give you a nicely laid out msgbox.

Somewhere in the last couple of releases, Access changed where MsgBox was processed.  Somebody else will have to fill in the precise details here but the end result was that the @ characters were not recognised any more.  So, this was the workaround:  

     eval("Msgbox(""" & prompt & """, " & Buttons & ", """ & Title & """)")

Apparently the Eval takes the String passed to it, evaluates it, and then processes it as a line of code.  And it does give the nicely laid out msgbox. 

My 2cents 

Stephen Bond


> -----Original Message-----
> From: Michael R Mattys [mailto:mmattys at rochester.rr.com]
> Sent: Wednesday, 22 June 2005 8:04 a.m.
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Eval function
> 
> 
> ----- Original Message -----
> From: "Hale, Jim" <Jim.Hale at fleetpride.com>
> To: "'Accessd (E-mail)" <accessd at databaseadvisors.com>
> Sent: Tuesday, June 21, 2005 3:04 PM
> Subject: [AccessD] Eval function
> 
> 
> > Okay, since it is quiet maybe we can start a discussion 
> about the Eval()
> > function. The article I just finished reading says  "The 
> Eval function
> lets
> > you deliver applications that can create themselves 
> dynamicaly at runtime.
> > You can build your app code at runtime, pass it to the Eval 
> statement, and
> > have your dynamically generated line of code processed." Sounds
> > interesting.Anybody use it?
> > Jim Hale
> 
> 
> Jim,
> 
> What else does this article say?
> Why do I need the eval function if I've already
> written the code to create a form, controls, CBF etc?
> 
> ----
> 
> Michael R. Mattys
> Mattys MapLib for Microsoft MapPoint
> http://www.mattysconsulting.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



More information about the AccessD mailing list