If optWindows.Value = True Then
   '选中
Else
   '未选中
end if

解决方案 »

  1.   

    If optWindows.Value Then
       '选中
    Else
       '未选中
    end if
      

  2.   

    在设计模式,在属性窗口,双击connectionstring(好像是这个属性),打开连接向导,据此一步一步完成连接,然后分析该属性的值(一个字符串)
      

  3.   

    dim cn as adodb.connection
    dim rs as adodb.recordsetcn.conncentstring="xxx"
    cn.open 
    rs.open cn,"select *"
      

  4.   

    Public Function DBConnect() As Boolean
        DBConnect = False
        
        On Error GoTo ErrHandler
        With g_Conn
           .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\WinTransPrice.mdb;Persist Security Info=False" 'Êý¾Ý¿âÁ¬½Ó×Ö·û´®
           .CommandTimeout = 15                                                            'Á¬½Óʱ¼ä
           .CursorLocation = adUseClient                                                   'Óαê
           .IsolationLevel = adXactChaos                                                   'ÊÂÎñ¼¶±ð
           .Mode = adModeReadWrite                                                         'Á¬½Óģʽ
           .Open
        End With
        
        DBConnect = True
        Exit Function
    ErrHandler:
        MsgBox "´ò¿ªÊý¾Ý¿âÁ¬½Óʧ°Ü£¬Çë¼ì²éÊý¾ÝÎļþÊÇ·ñ´æÔÚ£¡", vbOKOnly, "ϵͳ´íÎó"
    End Function
      

  5.   

    If optWindows.Value = 1 Then
       '选中
    Else
       '未选中
    end if
    如果已经用ADODB连接数据库了,那么你可以取它的代码。
      

  6.   

    1  checked 属性2  我不懂也。3 多少给点专家分
      

  7.   

    如果我已经用控件连接好了数据库,是否就不用语句连接了?给我一个添加数据的例子!给我一个显示数据的例子!(将数据通过DataGrid显示出来)。分不够可以另外开贴再加!
      

  8.   

    dim cnn as adodb.connection
    dim rst as adodb.recordsetcnn.conncentstring="Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=path\*.mdb"
    cnn.open 
    rst.open cn,"select *from tablename where ^o^"
     
    可以用ADODC自动生成连接字符串。
      

  9.   

    添加数据的例子:with rst
                          .addnew
                           .fields("字段")=值
                  end with
                    .
                    .
                    .
                  rst.update
    显示数据的例子:
                  datagrid.datasource=adodc1
      用ADODC连接到数据库!