请帮助编码 [英] help in coding please

查看:63
本文介绍了请帮助编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果他/她检查了两个复选框信息将同时显示车辆和服务,我还想要它,我需要添加到此代码中吗?



这个项目我们正在使用访问权限,所以从他/她选择它将显示在数据网格视图中...





.............................



昏暗的投诉类型如String =



如果chkService.Checked那么

complainttype =服务

结束如果

如果chkVehicle.Checked那么

complainttype =车辆

结束如果

解决方案

< blockquote>将=更改为+ =:

  Dim  complainttype  As   String  =   

如果 chkService.Checked 那么
complainttype + = 服务
结束 如果
如果 chkVehicle.Checked 那么
complainttype + = Vehicle
End 如果


I want it also if he/she checked both check boxes information will be displayed for both vehicle and service, what Do I have to add to this code??

in this project we are using access, so from what he/she choose it will be displayed in the data grid view...


.............................

Dim complainttype As String = ""

If chkService.Checked Then
complainttype = "Service"
End If
If chkVehicle.Checked Then
complainttype = "Vehicle"
End If

解决方案

Change the "=" to "+=":

Dim complainttype As String = ""

If chkService.Checked Then
    complainttype += "Service "
End If
If chkVehicle.Checked Then
    complainttype += "Vehicle"
End If


这篇关于请帮助编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆