Hi, help me in the "!" 
Author Message
 Hi, help me in the "!"

i meet the following codes and i am puzzled in the  "rs!supplierid". what is
meaning of "!", should it be similar to "."?
Thank you in advance

here is the codes:

Dim rs As Recordset
      Set rs = AdoProducts.Recordset

      While Not rs.EOF

             If rs!supplierid = 12 Then
             'the book indicated above , but i replace ! with .
             'in the next
             'If rs.supplierid = 12 Then
             'then vb told me that no function or method founded

                  DataGrid1.SelBookmarks.Add rs.Bookmark
                  'to see in the while segment choose the 12 or
                  'outside the while. add the following items
                  Debug.Print rs.Bookmark
            End If
            rs.MoveNext
      Wend



Sun, 10 Oct 2004 17:08:13 GMT  
 Hi, help me in the "!"
It is a bang symbol. It signifies that a field in the recordset is to
follow.
'rs' is the recordset and 'supplierid' is the field.
The following are all the same thing:

rs![supplierid]
rs!supplierid
rs("supplierid")
rs.fields("supplierid").value

HTH

Brian


Quote:
> i meet the following codes and i am puzzled in the  "rs!supplierid". what
is
> meaning of "!", should it be similar to "."?
> Thank you in advance

> here is the codes:

> Dim rs As Recordset
>       Set rs = AdoProducts.Recordset

>       While Not rs.EOF

>              If rs!supplierid = 12 Then
>              'the book indicated above , but i replace ! with .
>              'in the next
>              'If rs.supplierid = 12 Then
>              'then vb told me that no function or method founded

>                   DataGrid1.SelBookmarks.Add rs.Bookmark
>                   'to see in the while segment choose the 12 or
>                   'outside the while. add the following items
>                   Debug.Print rs.Bookmark
>             End If
>             rs.MoveNext
>       Wend



Tue, 12 Oct 2004 05:52:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VESA "HI RES" TEXT MODES

2. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

3. GetObject("","InternetExplorer.Application") fails in Excel VBA

4. SysCmd 603, "path","path"

5. Disabling "BACK"/"FORWARD" buttons

6. Loop print "VARIABLE", "VARIABLE"

7. DLL or something like "#"#ยค#"!"#

8. Disabling "BACK"/"FORWARD" buttons

9. CreateObject("Excel","//server"), MsgBox output

10. Problem With "window.showmodaldialog("")"

11. CreateObject("Excel","//server"), MsgBox output

12. "Cannot load """

 

 
Powered by phpBB® Forum Software