[AccessD] Problem adding a param. to a function

DWUTKA at marlow.com DWUTKA at marlow.com
Thu May 6 14:15:29 CDT 2004


Are you calling this function from other places?  If so, did you add that
argument in?  You can add parameters to existing functions, and not have to
backtrack to old 'users' of that function, by putting the arguments at the
end, and use the OPTIONAL flag before the parameter.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Clark
Sent: Thursday, May 06, 2004 2:05 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Problem adding a param. to a function


OK...this is probably something boneheaded and simple, but I haven't
posted any problems in a while, and my head feels like it is going to
explode from behind my eye sockets, so please bare with me...
 
I have been asked to do some alterations/additions to a program that I
wrote, a little over a year ago. What I am working on now is the simple
addition of a new report. I usually leave some 'reserved' buttons on my
Reports Menu because they always want more reports, so the buttons are
already there.
 
On my reports menu, I have hidden fields to accomodate a couple of the
different reports. These fields become visible, depending on the report
chosen--I have one that uses 'Start Date' and an 'End Date' fields, and
another that uses a drop-down to choose an employee. These also each
have a cancel button, and a proceed button. After you cancel or proceed,
the main buttons, which were disabled, when one was chosen, are
re-enabled, and the used fields become invisible again.
 
This report that I have added is also dependent on a starting and
ending date, so I used the same function to do the button magic (i.e.
disappear, reappear, setfocus, enable, etc.). However I needed an extra
IF statement to decipher which of two buttons was chosen. So I added the
if statement and added a parameter to go with it:
 
Function SeeDateInfo(Mode As Boolean)
 
has become
 
Function SeeDateInfo(Mode As Boolean, Button As Integer)
 
but when I change the function call to add another parameter, the help
tip comes up correctly--it tells me what it is looking for--but I get an
error:  Compile Error ... Expected: =
 
What in the hey am I doing wrong?!
 
Thanks for the help...now and in the past!
 
I gotta fly now to get my daughter's tooth yanked...arrrrghtt!!!
 
btw...A97
 
John W Clark
-- 
_______________________________________________
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