Subject Re: Data Entry
From Chuck Causey <ccausey1@cox.net>
Date Mon, 27 Apr 2015 22:55:35 -0400
Newsgroups dbase.getting-started
Attachment(s) Gig Pack5.jpg

Mervyn Bick Wrote:

> On Thu, 23 Apr 2015 18:38:05 +0200, Chuck Causey <ccausey1@cox.net> wrote:
>
>
> > Thanks for the ino Lee.  Concerning the multiple posts, look what I did  
> > to Mervyn Bick.  He wanted my code and I kept sending him pictures.  I  
> > shall follow your instructions and see how things work out.  I  
> > appreciate the time that you and Bick have devoted to my project.
>
> I haven\'t been called Bick since I was in secondary school and that\'s a  
> LONG time ago.  :-)
>
> The pictures of your forms were enough to give me an idea of how you  
> wanted your forms to work but without seeing how you have named your  
> objects or what fields are in your tables I can\'t give you code that will  
> fit straight into your form.
>
> You will have received a copy of the second edition of Ken Mayer\'s \"The  
> dBASE Book\" with your copy of dBASE 9.  In the book Ken covers everything  
> you need to get started with OODML (the new object oriented commands in  
> dBASE) in detail.  You can find a link to the actual code used in his book  
> just above the illustration at the bottom of the page at  
> http://www.goldenstag.net/dbase/dBASEBook.htm
>
> The book was published before the advent of dBASE 9 so some of the syntax  
> given doesn\'t match the code streamed out by the designer for, amongst  
> others, the database and query objects.  dBASE 9 does, however, still  
> accept the old syntax if you type in code.
>
> If you read the book it should answer most of your questions before you  
> need to ask them. :-)  Getting to grips with OODML is, however, a bit of a  
> challenge and you will always find help here in the newsgroups.
>
> Mervyn.
>
> Thank you Lee for the Entryfield Date tip It worked well.  I have simplified the form.
I continue to struggle with Arrays and Queries.  DBase Plus 9 is sure keeping me honest.  

Merwyn , I hope I didn’t insult you when I used your last name.  I am an old soldier and last names are the Army way.  Back to Plus 9.  I have been through  OODML three times and just when I think I have that Query thing  - the system tells me differently,  I tried to get away without an Alias when establishing a new query and -   q.sql := “select * from :ThePack:Pack2” and the system is looking for an expression.  I have used the Navigator without any success.  Out of frustration I rewrote the project (my project) not the dBase Plus project - the form Pack5.wfm is attached.  All that works is the On Open blanking of all fields except FWD(Total Cost on the form), and the Close pushbutton which updates a dog’s individual Table  Back to the Ken’s Big Book.  He stated that dBase Plus may or may not recognize Visual dBase 5.x.  These are the vdb5x Procedures included today’s attempt to make it work.  Can someone give me some examples to work with?  Particularly a code to add the Cost to the Total Cost (aka Fwd).  I am not having any luck converting Ken’s Fish to my Dogs.

   Procedure SPINBOX1_OnLostFocus                                                                          
   form.SaveRecord()                                
   return
  
   Procedure PUSHBUTTON4_OnClick                        
   Replace Rabies with ProDate                        
   Replace RDue with ProDate+1095                        
   Replace Provider with \"Peoria Animal Hospital\"                

                                                
   Replace Descrip with \"Immunizations\"                        
   form.SaveRecord()                                
   Return                                                
                                                                           
   Procedure PUSHBUTTON5_OnClick                        
   Replace DPT with ProDate                                
   Replace DDue with ProDate+365                        
   Replace Provider with \"Peoria Animal Hospital\"                
   Replace Descrip with \"Immunizations\"                                                
   form.SaveRecord()                                
   Return                                                
                                                   
   Procedure PUSHBUTTON6_OnClick                                
   Replace Bordatella with ProDate                                                
   Replace BDue with ProDate+365                        
   Replace Provider with \"Peoria Animal Hospital\"                        
   Replace Descrip with \"Immunizations\"                        
   form.SaveRecord()                
   Return                                                                                
                                                   
   Procedure PUSHBUTTON7_OnClick                        
   Replace Teeth with ProDate                                
   Replace TDue with ProDate+365                        
   Replace Provider with \"Peoria Animal Hospital\"                                        
   Replace Descrip with \"Teeth Cleaning\"                
   form.SaveRecord()                                
   Return                                                
                                                   
   Procedure PUSHBUTTON8_OnClick                                                
   Replace License with ProDate                                                
   Replace LDue with ProDate + 365                                                
   Replace Provider with \"Maricopa Animal Care\"                                        
   Replace Descrip with \"Annual License\"                                        
   form.SaveRecord()                                                        
   Return                                                                        
  
   Procedure ENTRYFIELD11_OnChange
   REPLACE FWD WITH FWD+COST
   form.SaveRecord()
   Return

   Procedure PUSHBUTTON9_OnClick
   DO FINI.PRG
   DO PACKMENU.WFM

   function form_onLostFocus()
      BLANK FIELDS ProDate,Provider,Descrip,Cost
      return