Solved

HOW TO DO IN FOXPRO

Posted on 2011-09-24
6
539 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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 86
White board coding practice 3 88
Windows Batch File - Display current time and date in FOR command 8 77
Fox pro using the copy command 5 31
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

770 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