[AccessD] Conditional compiling

Charlotte Foust cfoust at infostatsystems.com
Wed May 7 15:51:26 CDT 2003


No Enums in Access 97.  They weren't supported until A2k.  No custom
events until AXP.

Charlotte Foust

-----Original Message-----
From: John Colby [mailto:jcolby at colbyconsulting.com] 
Sent: Wednesday, May 07, 2003 9:40 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Conditional compiling


Seth,

You can conditional compile it:

#const Access2K True
#if Access2k then
Dim WithEvents cWinsock As CSocket
#else
Dim cWinsock As CSocket
#endif

The problem is that you can't sink the events if the else case is
executed. However..

I could swear that Withevents keyword was supported and sinking of
events was allowed in A97.  I thought RaiseEvent was there but didn't do
anything. I have no clue re enumeration.

And finally, even if you do this, you have to "comment out" entire
sections of code using the compiler constants and then that code doesn't
function anymore.  Compile errors if you have calls to code "commented
out" etc.  I don't know what you have in mind but it sounds like it
could be a mess.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Seth Galitzer
Sent: Wednesday, May 07, 2003 1:27 PM
To: accessd
Subject: RE: [AccessD] Conditional compiling


Here's the binding code:

Dim WithEvents cWinsock As CSocket

And CSocket is another class module in this mdb.  There are no other
WithEvents declarations in the code anywhere.  So is this still no good?

Seth

On Wed, 2003-05-07 at 12:16, John Colby wrote:
> That's correct, you can't late bind OBJECTS that you are sinking 
> events
for.
>
> John W. Colby
> www.colbyconsulting.com
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jim DeMarco
> Sent: Wednesday, May 07, 2003 12:07 PM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] Conditional compiling
>
>
> Actually IIRC, per his post you cannot late bind WithEvents.
>
> Jim DeMarco
>
>
> -----Original Message-----
> From: Wortz, Charles [mailto:CWortz at tea.state.tx.us]
> Sent: Wednesday, May 07, 2003 11:50 AM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] Conditional compiling
>
>
> Seth,
>
> John Colby's  e-mail of 05/05 titled "Late binding Withevents" shows 
> how to do conditional compiling.  One of the properties of Access 
> gives the version number; however, I do not recall the name of that 
> property.
>
> Charles Wortz
> Software Development Division
> Texas Education Agency
> 1701 N. Congress Ave
> Austin, TX 78701-1494
> 512-463-9493
> CWortz at tea.state.tx.us
>
>
>
> -----Original Message-----
> From: Seth Galitzer [mailto:sgsax at ksu.edu]
> Sent: Wednesday 2003 May 07 10:44
> To: accessd
> Subject: [AccessD] Conditional compiling
>
> Greetings,
>
> I've got an app that needs to run on A2K and A97.  I've got some code 
> that uses user-defined enumerated types and some WithEvents 
> declarations, neither of which are supported by A97.  Is there a way 
> to conditionally compile the code depending on the Access version?  I 
> know you can use conditional statements, but I don't know if they can 
> be used in this way.  Right now, I'm supporting two versions of the 
> app, one for each version of Access, but it's making updating a real 
> pain.  I'd also like to be able to create conditions based on the 
> Windows version.  I imagine both are similar, if they are even 
> possible.
>
> Any info and samples would be appreciated.
>
> Seth
>
> --
> Seth Galitzer			sgsax at ksu.edu
> Computing Specialist		http://puma.agron.ksu.edu/~sgsax
> Dept. of Plant Pathology
> Kansas State University 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
************************************************************************
****
> *******
> "This electronic message is intended to be for the use only of the 
> named recipient, and may contain information from Hudson Health Plan 
> (HHP) that
is
> confidential or privileged.  If you are not the intended recipient, 
> you
are
> hereby notified that any disclosure, copying, distribution or use of 
> the contents of this message is strictly prohibited.  If you have 
> received
this
> message in error or are not the named recipient, please notify us 
> immediately, either by contacting the sender at the electronic mail
address
> noted above or calling HHP at (914) 631-1611. If you are not the 
> intended recipient, please do not forward this email to anyone, and 
> delete and destroy all copies of this message.  Thank You".
>
************************************************************************
****
> *******
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
--
Seth Galitzer			sgsax at ksu.edu
Computing Specialist		http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.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