Conditional compilation arguments

R

René François

Hi all! And thank you in advance for your help.

I know it's probably not the accurate group to post this question but I
could not find any other.

Can anyone tell me if it's possible to have more than one conditional
compilation argument in an Access mdb (in VBA, menu tools, properties of
...., conditional compilation argument).

What I'm trying to do is this: I have a program with a conditional
compilation argument ERR_ON (= 0 or =-1). while in developement ERR_ON = 0
(False); in production ERR_ON = -1 (True), because all the functions begin
with:

#If ERR_ON then
On Error Goto Err_...
#End If

Now I would like to add another compilation argument (True or False) such
as:

#If DEBUG_MODE Then
intHandle = FreeFile
Open XXX.Log for Append as #Inthandle
Print #IntHandle, strSQL 'strSQL is a SQL sentence sent to a SQL
server
Close #intHandle
#End If

Many thanks!
 
M

Marshall Barton

René François said:
Hi all! And thank you in advance for your help.

I know it's probably not the accurate group to post this question but I
could not find any other.

Can anyone tell me if it's possible to have more than one conditional
compilation argument in an Access mdb (in VBA, menu tools, properties of
..., conditional compilation argument).

What I'm trying to do is this: I have a program with a conditional
compilation argument ERR_ON (= 0 or =-1). while in developement ERR_ON = 0
(False); in production ERR_ON = -1 (True), because all the functions begin
with:

#If ERR_ON then
On Error Goto Err_...
#End If

Now I would like to add another compilation argument (True or False) such
as:

#If DEBUG_MODE Then
intHandle = FreeFile
Open XXX.Log for Append as #Inthandle
Print #IntHandle, strSQL 'strSQL is a SQL sentence sent to a SQL
server
Close #intHandle
#End If

Set the property to:

ERR_ON=-1:DEBUG_MODE=-1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top