用VB编写一程序 关于招聘条件的

来源:百度知道 编辑:UC知道 时间:2024/05/14 12:59:31
希望高手能赶快回答
用人单位招聘秘书:年龄小于35岁,女,学历专科或本科,用VB编写一程序,在窗体上创建四个文本框,名称分别是Text1,Text2,Text3,text4,分别用于输入年龄,性别,学历,在窗体上添加一个命令按钮command1, 点击按钮后根据用户的输入数据,如果合格则在text4中输出“合符招聘条件”,反之输出“不合符招聘条件”。

if (Text1.value<35 and Text2.value="女"and Text3.vlaue="专科"|Text3.vlaue="本科") then
Text4.vlaue="合符招聘条件"
else
Text4.vlaue="不合符招聘条件"
end if

Private Sub Command1_Click()
a = Val(Text1.Text)
b = Text2.Text
c = Text3.Text
If a < 35 Then
If b = \"女\" Then
If c = \"本科\" Then
Text4.Text = \"符合\"

End If
End If
End If
If a < 35 Then
If b = \"女\" Then
If c = \"专科\" Then
Text4.Text = \"符合\"
End If
End If
End If
If a > 35 Then
Text4.Text = \"不符合\"
End If
If b = \"男\" Then
Text4.Text = \"不符合\"
End If
End Sub

用if 嘛.
if (Text1.value<35 &Text2.value="女"&Text3.vlaue="专科"|Text3.vlaue="本科")