[Gambas-user] How to check a number of textboxes for data

Jussi Lahtinen jussi.lahtinen at ...626...
Sat Jan 31 16:20:20 CET 2015


Does this work?


Dim o As Object

     For Each o In Me.Controls
          If o.Tag = "Data" Then ' Optionally If o Is TextBox Then
               Print o.Name;; o.Text
          Endif
     Next



Jussi



On Sat, Jan 31, 2015 at 5:07 PM, bill-lancaster <bill-lancaster at ...2231...>
wrote:

> This must be simple but I can't see it!
>
> I have a 5 textboxes on a form and wish to ensure that they all contain
> data
> before creating a new record in a database.
> By setting them all with Tag ="Data" the following code finds the controls.
>
> Dim c As Control
>      For Each c In Me.Controls
>           If c.Tag = "Data" Then
>                Print c.Name
>           Endif
>      Next
>
> But how to examine the .text value?
>
>
>
> --
> View this message in context:
> http://gambas.8142.n7.nabble.com/How-to-check-a-number-of-textboxes-for-data-tp50440.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list