If Condition
กระทู้เก่าบอร์ด อ.Yeadram

 944   1
URL.หัวข้อ / URL
If Condition

ช่วยด้วยครับ
ผมมี หลาย combobox และ textbox ครับ
เงื่อนไขมีอยู่ว่า ถ้าไม่มีค่าใน combobox และ textbox ทั้งหมดให้ แสดงข้อความหลังจากที่กดปุ่ม submit

แนะนำวิธีเขียน If ให้ด้วยครับ ทำไม่เป็น
Private Sub submit_Click()
If Me.cbocategory.Value = "" And Me.cboname1.Value = "" And Me.cboname2.Value = "" And Me.txtstartdate.Value = "" And Me.txtenddate.Value = "" And Me.cbosalepersonid.Value = "" Then
    MsgBox "Please Select item"
End If
End Sub

1 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R17415
ทำได้แล้วครับ มั่วๆถูกพอดี


Private Sub Command27_Click()
If IsNull(cbocategory) And IsNull(cboname1) And IsNull(cboname2) And IsNull(txtstartdate) And IsNull(txtenddate) Then

    MsgBox "Please Select item"
End If
End Sub
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.1658s