On Tue, 2012-09-04 at 11:46 -0700, rocko wrote:
> I have a table with several fields but I only want certain fields
> to be displayed in a dataviewer.
> Not sure on how to do this.
> So far i only have this, which isn't much.
> 
>  Dim sView As Result
>  Dim ID As Integer
>  
>  sView = DB.Find("inventory ", id &1, ID)
>  For Each sView
>    If sView!daysLeft < 22
>    'put the name and days left in the name and daysleft field of the
> dataview
>  Next
> 

I have 5 fields in a table but I only need to display 3 of them and only
when the 'daysLeft' field is less the 21.

This is some pseudo code:
 sView = DB.Find("inventory", id = &1, ID)
 For Each sView
   If sView!daysLeft < 22
      DataView1.name = sView!name
      DataView1.location = sView!location
      DataView1.daysLeft = sView!daysLeft
  Endif

-- 
rocko <[email protected]>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to