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

Find highest number in four fields and replace fifth 1

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB

Hi

I have four fields in table and each record can contain a different number. I want to try and replace the fifth field with the highest number from the four fields. e.g.

Field names:

numb1 = 25
numb2 = 37
numb3 = 21
numb4 = 16

I would want numb5 to be replaced with numb2 (37) or whatever field contains the highest number which changes from record to record.

Searched the forum guys, there are some posts but cant find anything like this.

I'm sure there is a simple solution or command, your guidance is appreciated as always.

This version: VFP6

Lee
 
Ditto:

With an ALL at the end if all Field5's are to be replaced... Quick and fast..
 

Thanks Jim, worthy of a star for the fast response and resolution!

Imaginecorp: Thanks as well for your post and backup comment.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top