请帮我翻译一下VB的语句吧Private Sub Command1_Click() Dim mrc As ADODB.R

1个回答

  • 私有潜水艇Command1_Click() 昏暗的mrc 作为ADODB.Recordset 黯淡MsgText 当串昏暗的txtSQL 作为串

    如果没有Testtxt(txtClassno.Text) 然后MsgBox ",vbOKOnly + vbExclamation," txtClassno.SetFocus 出口潜水艇末端如果

    如果没有Testtxt(comboGrade.Text) 然后MsgBox ",vbOKOnly + vbExclamation," comboGrade.SetFocus 出口潜水艇末端如果

    如果没有Testtxt(txtDirector.Text) 然后MsgBox ",vbOKOnly + vbExclamation," txtDirector.SetFocus 出口潜水艇末端如果

    如果没有Testtxt(txtClassroom.Text) 然后MsgBox ",vbOKOnly + vbExclamation," txtClassroom.SetFocus 出口潜水艇末端如果

    如果没有IsNumeric(Trim(txtClassno.Text)) 然后MsgBox ",vbOKOnly + vbExclamation," 退出次级txtClassno.SetFocus 末端如果

    txtSQL = "精选* 从class_Info" 设置mrc = ExecuteSQL(txtSQL,MsgText) mrc.MoveFirst

    当(mrc.EOF = 假) 如果(Trim(mrc.Fields(0)) = Trim(txtClassno.Text)) 然后MsgBox ",vbOKOnly + vbExclamation," 退出次级txtClassno.Text = "" txtClassno.SetFocus mrc.MoveNext 末端如果走向

    mrc.AddNew mrc.Fields(0) = Trim(txtClassno.Text) mrc.Fields(1) = Trim(comboGrade.Text) mrc.Fields(2) = Trim(txtDirector.Text) mrc.Fields(3) = Trim(txtClassroom.Text) mrc.Update mrc.Close MsgBox ",vbOKOnly + vbExclamation,"

    末端潜水艇

    私有潜水艇Command2_Click() 卸载我末端潜水艇

    私有次级Form_Load() comboGrade.AddItem " comboGrade.AddItem " comboGrade.AddItem " comboGrade.AddItem " ' comboGrade.AddItem " ' comboGrade.AddItem " 末端潜水艇

    怪怪的!哈哈!