Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where's Lance? 1

Status
Not open for further replies.

DLDavis

Technical User
Oct 26, 2001
24
US
Lance...

I left you a message at WP-U last week. Did you get it? I'm still trying to get the 10 business days thing to work. Thanks to your advice, I got the 15 working days to work. The name of the fields, etc. were put in the long WP-U post. Got time to help me on that?

Thanks,


Dan
 
The code I gave in the related post in this forum is ObjectPAL which needs to be inserted into a method. From the posts in WP-U, I conclude that you are using a formula or calculated field. These will only accept a limited number of functions, and don't support statements like switch. Some questions:
1. What decides whether the 10 day or 15 day rule is to be applied? Is there a value somewhere which can be tested? If so what are the possible values? What is this (field) object's name?
2. What is the name of the unbound field where you want this value to be displayed?
3. What is the name of the field from which you want to calculate the date (DateSeen?)?
 
Thanks for the reply. I'm not as knowledgeable as you on p9, so some of the terms are not understood. Here goes anyway (your text as copied...mine in ALL CAPS):


The code I gave in the related post in this forum is ObjectPAL which needs to be inserted into a method.

I'M NOT SURE WHAT A "METHOD" IS...BUT WILL LOOK IT UP IN THE P9 HELP SYSTEM. BEEN LOOKING FOR A GOOD BOOK ON P9, BUT ALL I CAN FIND IS ACCESS ACCESS ACCESS.

From the posts in WP-U, I conclude that you are using a formula or calculated field.

I'M NOT SURE WHAT THE DIFFERENCE BETWEEN THE TWO IS. WHAT I DID WAS TO DEFINE A FIELD WITHIN A FORM AS A CALCULATED FIELD...AND INSERT THE FORMULA THERE.


These will only accept a limited number of functions, and don't support statements like switch.

OH WELL...THAT'S ALL I KNOW HOW TO DO AT THE MOMENT.

Some questions:
1. What decides whether the 10 day or 15 day rule is to be applied? Is there a value somewhere which can be tested? If so what are the possible values? What is this (field) object's name?


YES! THE FIELD WITH THE VALUE THAT DETERMINES WHETHER THE REPORT DUE DATE IS EITHER...

"APPT DATE" + 15

OR

"APPT DATE" + 10 BUSINESS DAYS

....IS A FIELD CALLED "AGENCY". DATA IN THIS FIELD SPECIFIES WHICH AGENCY REFERRED THE CLIENT TO ME. IF THE LETTERS IN THE "AGENCY" FIELD ARE "ABC" THEN IT'S A STRAIGHT "APPT DATE" + 15 (WHICH I ALREADY HAVE WORKING CORRECTLY). IF THE LETTERS IN THE FIELD NAMED "AGENCY" ARE "XYZ", THEN IT'S THE "APPT DATE" + 10 BUSINESS DAYS

2. What is the name of the unbound field where you want this value to be displayed?

"REPORT DUE" IS WHERE I'D LIKE THE VALUE TO BE DISPLAYED.

I DON'T KNOW WHAT AN UNBOUND FIELD IS. IS THAT ONE WHERE IT IS DEFINED WITHIN A FORM WITHOUT ACTUALLY ADDING A FIELD TO THE TABLE?

3. What is the name of the field from which you want to calculate the date (DateSeen?)?


THE NAME OF THAT FIELD IS:


"APPT DATE"

...WHICH STANDS FOR "APPOINTMENT DATE",WHICH IS WHEN I SAW THE CLIENT.


THANKS FOR THE HELP!


DAN


 
Try the formula below (do a copy and paste and put it all on the one line). This is basically the formula given by Lance in WP-U.

date(iif(agency.value="ABC",appt_date.value+15, iif(agency.value="XYZ",appt_date.Value+14+iif(dowOrd(appt_date.Value)=1,-2,0)+iif(dowOrd(appt_date.Value)=7,-1,0),"")))
 
Thanks for the reply with the code. I'll give that a try shortly and see what happens.

What ever became of Lance? I tried Lance's formula, but just got error messages.
 
Yo...NotAllThere...home run! Thanks! The formula worked perfectly first time! After clicking through a bunch of records...I found that way over 99% of the date+15 and date+10 business days....yeilded exactly the same date!

Is there a way to get the due dates into a report? Is there a way to add a field to the database that could use the same code? If so, I couldn't figure out how to do it.

Thanks again!

Dan
 
You can use the same approach on a report. Just place a calculated field on the report which uses the same formula.

You could add a new field to your table, but then you'll have to create some different code to populate it, if it's blank. Not overly complex, but since you now have the calculated field working and the solution will work with a report, it may not be worth the trouble.
 
Dan,

Sorry for not being completely available last week. There's a reply on wpuniverse that covers pretty much the same things.

-- Lance

P.S. It happens sometimes. Sorry.
 
Lance...

So glad you're back! Got some help that got me through, tho, in your absence. I'm way ahead of where I would have EVER been w/o the help I've gotten on this forum. i can figure stuff out by tinkering..but it's gotten to where I don't have the hours to put into it. I know there is much to be learned by picking up some knowledge about queries, but I don't have a decent book on the topic...and time is so much more limited these days. Had to hire a network guy to come in last week just to dig me out of a jam I could have dug myself out of time permitting. There's a lot about Paradox I have a vague understanding of, but am still unsure of...but it's a lot easier to use than dbase ever was.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top