VB POPULATE DATA WITH PREVIOUS ROW S’abonner

0
Avatar
Boh B

I have CSV database as below with empty fields, seperated by comma. 

ABC Corp,COMSAT MEDIA 37063,PC,USER1,11
,,,USER2,7
,,,USER3,3
,,,USER4,1
,,,USER5,1
DEF Ptd,DSTECH MYTI17-1832,FIREWALL,WALL01,1
,,,WALL02,2

Would it be possible if I select only (for print) the 7th record, the empty field of 7th row data will follow that of 6th row data?

If (LEN(Field("fnf.fnf.nil")) > 0 ) Then
Value = Field("fnf.fnf.nil")
End If

I have tried the above script and works only if all records are selected. Any ideas to proceed?

 

1 commentaires

0
Avatar
Pete Thane
Actions pour les commentaires Permalien

I dont think so as if you are only selecting record 7 then the information for record 6 wont be loaded into memory

However, I guess, if you can save the record number you have selected somehow you could use the vb ReadLine  method to readline line X-1 into memory and then do you checks to see if the field is empty and if it is add the value from the readline field instead 

Vous devez vous connecter pour laisser un commentaire.