Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 581
  • Last Modified:

HOW TO DO IN FOXPRO

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
consult_dvs2005
Asked:
consult_dvs2005
  • 4
2 Solutions
 
jrbbldrCommented:
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
 
pcelbaCommented:
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
 
jrbbldrCommented:
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jrbbldrCommented:
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
 
consult_dvs2005Author Commented:
I COULD NOT UNDERSTAND WHAT IS " DO EditRecord"
0
 
jrbbldrCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now