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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avaible records and a grid problem 2

Status
Not open for further replies.

DannC

Programmer
Apr 5, 2001
75
RO
Hi,
Q1: How can I get the number of max avaible records from a table WITHOUT MOVING THE POINTER.

Q2: How to put in a grid column a cboBox not using code (like .removeobject(Text1) and .addobject("cboQ","ComboBox"))
 
nefra
Q1

? RECCOUNT([TABLENAME])

or (moves pointer but goes back to original record)

lnRecno = RECNO([TABLENAME])
COUNT FOR expr TO lnTotal
GO lnRecno
? lnTotal

Q2
FAQ184-426

Chris :)
 
Q1
Code:
SELECT COUNT(*) FROM [tablename] INTO ARRAY aList
? "No. records = " + STR(aList[1]

Note that RECCOUNT() is not affected by SET DELETED or SET FILTER TO.
Using a SELECT - SQL, that's quite easy to do; for example:
Code:
SELECT COUNT(*) FROM [tablename] WHERE !DELETED() INTO ARRAY aList

Obviously, the same can be done using the COUNT FOR, as long as one doesn't forget to put the record back.
Diederik Vermeeren
verm1864@exact.nl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top