Skip to main content
Home
Live to Learn!

Main navigation

  • Home
  • Learn
    • FoxPro
    • MS-DOS
    • C PRG
    • Java
    • ASP
    • Ruby on Rails
    • ASP.NET
    • E-Books
    • Exam Preparation
    • Tools
  • Blog
  • Forums
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. FoxPro Programming

Foxpro commands - Part 2

Book navigation

  • FoxPro Commands - Part 1
  • Foxpro commands - Part 2
  • Data Types in FoxPro
  • Numeric Functions in FoxPro
  • Creating a Program
  • Input and Output Statements in Foxpro
  • Control Structures in Foxpro
  • Creating menu in Foxpro for DOS
  • Simple Journal Entry program
  • Simple Ledger creation & Posting Program
  • Trial Balance Program
  • Balance Sheet Program
  • Simple Weekly Calendar Generation
  • How to install FoxPro 2.6 in Windows 10 / Windows 8 / Windows 7?
  • How to install FoxPro 2.6 on Linux OS (Ubuntu 20.04 | 20.10 | 21.04)?
  • How to install FoxPro in Windows 10 64 bit using VDosPlus?
By Karthikeyan , 1 February, 2013

14. Navigation with Records

GO or GOTO both do the same things in Foxpro.

GO TOP

Used to move the record pointer at the first record.

GO BOTTOM:

Used to move the record point at the last record.

Go

To go to a particular record

Syn:- GO <recordno>

Eg:- GO 8

Go to record 8

SKIP

- To skip number of records

e.g. To skip 3 records - SKIP 3

15. To List the records

LIST - To list the records in screen, not in window

It can be used with condition as below:

LIST for val(price) > 100

LIST itemname, price+20

- This command lists item name with price rupees 20 added. The changes are applied only to the view, it not saved in database.

LIST product, price*2

- price is multiplied with 2.

16. To view the records as manipulatable view

BROWSE - To browse the records

BROWSE NOEDIT  - To browse the records in read only view, The records can be marked for deletion using Ctrl + T shortcut

BROWSE NODELETE - To avoid deleting while browsing the records

17. To display current record number

?RECNO()

18. To display the dbf files in the current directory

DIR

19. Hide or Show heading in list view

SET HEADINGS OFF

SET HEADINGS ON

20. Printing

SET PRINT ON

- This command sends the out put to printer

- To stop this use the command SET PRINT OFF

SET PRINTER TO LPT1

- To set the output printing port to LPT1

21. Handling date and date format

To display current system date

?DATE()

To set century on to display year in 4 digits.

SET CENTURY ON

SET CENTURY OFF

To set date format

dd/mm/yyyy   => SET DATE BRIT

mm/dd/yyy   => SET DATE AMERICA

yyyy/mm/dd  => SET DATE JAPAN

22. Replace command

To replace the content of the specified field in the database table. i.e., This command can be used to remove the data in the particular field (nullifying / empty a field)

e.g.

 REPLACE fieldname WITH ""

- To replace with null value

REPLACE fieldname WITH {  /  /  }

- To replace the date field with null value

 

REPLACE ALL QUANTITY WITH 0

- Replaces the data in the quatity fied with 0 in all the records.

REPLACE ALL PRICE WITH PRICE+50

- Adds 50 to the price field.

23. Blank

To blank some or all the fields in the current record.

BLANK

- To blank all the fields in the current record

BLANK FIELDS <field1>, <field>

- To blank specified fields in the current record

  • Add new comment
Tags
Foxpro Basic Commands
Foxpro Tutorial for beginners
Foxpro 2.6
Foxpro DOS

Comments4

Monali Patil (not verified)

8 years ago

can anyone please having pdf or link about report generation in foxpro please provide here if anyone having..i need very badly..

felix daniel (not verified)

8 years 11 months ago

how to get the data from the foxpro 2.6 database while typing (like mobile search)

Profile picture for user Karthikeyan

Karthikeyan

9 years 3 months ago

In reply to by Akash1000 (not verified)

It removes unnecessary out put. i.e., command results It is just like @echo off in batch files.
Try it yourself with SET TALK ON, you can get better understanding.

Akash1000 (not verified)

9 years 3 months ago

why do you type SET TALK OFF while creating program? What does it do actually?

Featured Blog Posts

Convert Currency in Number to Words (Indian Rupees) - MS Excel
Foxpro Tutorial and Programs
Convert Currency in Number to Words in MS Word
Convert Currency in Number to Words (Indian Rupees) - Version 2
Best way to Use Rupee Symbol in Windows – Easy steps
Convert Currency in Number to Words - MS Access
Creating All in One Windows XP DVD with all Important Applications
RSS feed

© 2009-2025 Live to Learn.In

Terms of Use | Privacy Policy