home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,443 of 9,834   
   Bill McCray to spyregyre@gmail.com   
   Re: paradox 11 and creating a database   
   23 Aug 08 20:43:51   
   
   60639048   
   From: McCrayBill@SpringMind.com   
      
   On Sat, 23 Aug 2008 16:41:47 -0700 (PDT), spyregyre@gmail.com wrote:   
      
   > I've asked a few questions before and the answers were really helpful.   
   >   
   > I'm an attorney who does a large number (>500) of cases every year.   
   > These cases are short from beginning to end, about 60 days. Because I   
   > use Wordperfect for most of my documents, I'd like to set up a paradox   
   > database to use for merging my WP docs and also for billing. The   
   > billing is not very complicated. It is usually a flat fee and no   
   > hourly charges.   
   >   
   > I need to keep track of about 6-10 billing events and up to 6 persons   
   > on each case.   
   >   
   > I learn quickly and have a basic understanding at this point. I've   
   > already created a database for the client information but want to   
   > expand it.   
   >   
   > Any information would be helpful. I also anticipate handing this off   
   > to a programmer for more complicated issues.   
   >   
   > To start I would like some help on the following issues.   
   >   
   > I need a record number that is related to the year and the actual file   
   > number (e.g. 08-0001) how do I have that show up and advance one for   
   > each record I create?   
      
   I may not get the syntax exactly right; I don't write in OPAL that   
   often.  I'm sure we'll get corrections if I'm wrong.   
      
   Create a table (say CaseNum), with one integer field (say CaseNo), and   
   one record.  At the start of each year, initialize the field to the   
   value of 1.   
      
   Var   
   	Yr, Case	String   
   	I					Integer   
   	TC				TCursor   
   EndVar   
      
   Yr = Year(Today())   
   Yr = Yr.Substr(Yr.Size() - 1, 2) ; extracts last two digits of year   
   TC.Open("CaseNum")		; might want some error checking here   
   TC.Edit()   
   I = TC."CaseNo"   
   TC."CaseNo" = I + 1   ; increment case number for the next case   
   TC.Close()   
   Case = "000" + string(I)	; adds leading zeroes   
   Case = Case.Substr(Case.Size() - 3, 4) ; extracts last four digits   
      
   Your case number then is Yr + "-" + Case   
      
   Afterthought:  you could put another field in your table in which the   
   year is stored.  Don't get the year from there, but after opening the   
   table and turning Edit on, compare the year stored there with the year   
   you got in the first two statements.  If they are the same, continue   
   as above.  If they are different, set the year field to the current   
   year and set the case number to 1.  Then continue with the rest of the   
   statements.   
      
   Bill   
      
   ----------------------------------------------------------------   
   Reverse parts of the user name and ISP name for my e-address   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca