Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can creat screen for data entry in foxpro

Status
Not open for further replies.

ask975c

Programmer
Apr 21, 2012
1
US
how can creat screen for data entry in foxpro
 
you can make a form and add controls on it

you can open the table and issue a browse command where you can edit the data

there are many ways to do that.
what exactly are you trying to accomplish. how many fields, what type of app? how many users? are there any validations?


Ali Koumaiha
TeknoSoft Inc.
Michigan
 
That is a VERY GENERAL question and not very specific.

Since there is a LOT more to just making a screen (a VFP Form) for data entry than just creating the Form itself, I'd suggest that you spend some time with the free on-line VFP tutorial videos at:

Of particular interest might be the videos on:
Building a Simple Application

If you have specific questions, please come back and we will do our best to help you out.

Good Luck,
JRB-Bldr
 
Homework in Foxpro?

The simplest would perhaps be to use the Wizard (menu: file->new, choose form, click wizard) and let it generate a form. It's even somewhat maintainable, but you inherit quite some code from ffc (foxpro foundation classes).

The next easiest thing to do is create a new form (saame menu:file->new, choose form, but click "new file") and put the table or tables you want to edit into the dataenvirnment of the form. (menu: View, select Data Environment)

The first time you open the dataenvironment, you're prompted to choose a table.

Drag a field from the table(s) you put into the datenvironment to the form. Repeat for othe fields. Drag a whole table on the form and you get a grid control.

All neccessary things to display data editable are there.

Start the form via the standard toolbar ! button.

That's it.

You can now add buttons for navigating to top, bottom, next or previous record in the table. with the following codes:

go top botton: GO TOP
go bottom button: GO BOTTOM
next button: SKIP 1
previous button: SKIP -1

You will find out that SKIP -1 leads to an error, if you are already at the top, but you can check, if BOF() is true, which tests for "begin of file". Same goes for EOF() at the "end of file".

Bye, Olaf.
 
If it is a Homework project, then ask975c needs to remember that:
Promoting, selling, recruiting and student posting
are not allowed in the forums.


Good Luck;
JRB-Bldr
 
o top botton: GO TOP
go bottom button: GO BOTTOM
next button: SKIP 1
previous button: SKIP -1

Just to add to Olaf's advice:

- If you have more than one table open, place a command to select the relevant alias before the nagivation code (SELECT SomeTable).

- After the navigation, issue THISFORM.Refresh.

But, for a Foxpro newcomer who just wants a quick-and-dirty form, I'd say go with the wizard.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I notice that the OP asked about "foxpro" and not "visual foxpro", so I wonder if maybe he is using a legacy version in which case some of the answers here would not apply.

mmerlinn


Poor people do not hire employees. If you soak the rich, who are you going to work for?

"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Raymond
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top