Solved

HOW TO DO IN FOXPRO

Posted on 2011-09-24
6
529 Views
Last Modified: 2012-05-12
IF I AM WRITING A DATA ENTRY PROGRAM IN FOXPRO
I AM ENTERING FIELD LIKE ARTICLE NO, QTY RATE
I HAVE GIVEN AN OPTION AFTER EVERY ENTRY TO CONTINUE OR NOT.
SUPPOSE AFTER ENTERING 4 RECORDS I REALIZE THAT I HAVE ENTERED SOMETHING WRONG IN FIRST ENTRY CAN I MODIFY THAT WITHOUT COMING OUT OF DATA ENTRY PROGRAM.
0
Comment
Question by:consult_dvs2005
  • 4
6 Comments
 
LVL 12

Expert Comment

by:jrbbldr
ID: 36592130
You can look at the advice Pavel and I gave you on your other posting on basically the same topic:
    http://www.experts-exchange.com/Microsoft/Applications/FoxPro/Q_27325639.html#a36592122

Good Luck
0
 
LVL 41

Accepted Solution

by:
pcelba earned 150 total points
ID: 36592219
Obvious solution is to define hotkeys to skip over the existing table records. E.g.

ON KEY LABEL F11 DO SkipProc
ON KEY LABEL F12 DO SkipProc WITH -1

PROCEDURE SkipProc
PARAMETER lnOffset

IF EMPTY(lnOffset)
  SKIP
ELSE
  SKIP (lnOffset)
ENDIF

DO EditRecord

RETURN

Of course, this procedure must test if the SKIP command is allowed if you aren't at the file beginning or end etc. The SKIP should not be allowed if you are in the middle of the new record appending etc. Everything depends on your application design and you should do it after some analysis.
0
 
LVL 12

Assisted Solution

by:jrbbldr
jrbbldr earned 100 total points
ID: 36592280
SUPPOSE AFTER ENTERING 4 RECORDS I REALIZE THAT I HAVE ENTERED SOMETHING WRONG IN FIRST ENTRY CAN I MODIFY THAT WITHOUT COMING OUT OF DATA ENTRY PROGRAM.

Another way would be to make ALL data entries temporary until they are COMMITTED into the Real data tables.

All of your session data can be put into a temporary cursor (READWRITE) and edited from Text Boxes on a Form.  

If the user wanted to go back and edit the data, they could do so by merely selecting the appropriate data record from a Form object (a Grid, a Combobox, or something).  Then that data would be put into the Form's text boxes for further editing or deleting.

Then, when completely happy with the entries the user can COMMIT the entries to the Real data.

As Pavel says above:  Everything depends on your application design and you should do it after some analysis.

At best, we are guessing on how you created your application.  
Maybe you should look at how other similar 'off-the-shelf' applications might handle what you need and then model your own application after those.

Good Luck

0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 12

Expert Comment

by:jrbbldr
ID: 36592292
I repeat what I suggested in your other broad-spectrum question regarding the same thing:
If you want to LEARN Visual Foxpro, you might want to take some time and watch the free on-line VFP tutorial videos at:   http://www.garfieldhudson.com/FreeVideos.aspx

Maybe paying particular attention to:
  Building a Simple Application - Pt. 1
   Building a Simple Application - Pt. 2
   Building a Simple Application - Pt. 3
   Building a Simple Application - Pt. 4
   Building a Simple Application - Pt. 5
   Building a Simple Application - Pt. 6

and any of the other tutorial videos which might point you in the right direction.

Good Luck

0
 

Author Closing Comment

by:consult_dvs2005
ID: 36594541
I COULD NOT UNDERSTAND WHAT IS " DO EditRecord"
0
 
LVL 12

Expert Comment

by:jrbbldr
ID: 36595748
I COULD NOT UNDERSTAND WHAT IS " DO EditRecord"

In that example you have a program file named  EditRecord

The DO EditRecord command says - run the program: EditRecord

Good Luck

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now