Solved

HOW TO DO IN FOXPRO

Posted on 2011-09-24
6
512 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 12

Expert Comment

by:jrbbldr
Comment Utility
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
Comment Utility
I COULD NOT UNDERSTAND WHAT IS " DO EditRecord"
0
 
LVL 12

Expert Comment

by:jrbbldr
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

10 Experts available now in Live!

Get 1:1 Help Now