Total Items In Table Question

GregSmith

Registered User.
Local time
Today, 17:05
Joined
Feb 22, 2002
Messages
126
I have a table called 'serverlst' that has 19 items in it.

What I am trying to do is have a command button on my forms page that will allow me to select 'ALL' the items in my serverlst table.

I am trying to do something like this:

for x = 1 to #items in serverlst table
open for write item x (need the name and not the ID)
print #1, some information
next x
close x
call shell external program

Can someone tell me the correct code for this??
 
=DCount("[Servers]","ServerLst")

This gives me the correct number of items in ther server field from the serverlst table. Which is 19.

Anyone know how the get the name of each item?

Say ID 1 = server1
ID 2 = server2
......
ID 19 =server19

psudo: name$ = tblServerLst,servers,2,14

This would look at table: serverlst in the servers field which is column 2 and item 14 would report server14

Any clues on the code to do this?
 
And
=DLookUp("[Servers]","ServerLst","[ID] = 19")

Will give me the name of item 19!!
 

Users who are viewing this thread

Back
Top Bottom