Sub
StatusRoom()‘’==è Form Load (: Call StatusRoom())
Cmd = New OleDbCommand("select *
FROM StatusRoom", Conn)
Dr = Cmd.ExecuteReader
cmbStatus.Items.Clear()
Do While Dr.Read
cmbStatus.Items.Add(Dr.Item(0))
Loop
End Sub
Sub
Status()’’==è combo IelectIndexChanged (: Call Status())
cmbID.MaxLength = 4
Cmd = New OleDbCommand("Select *
from StatusRoom where Status='" & cmbStatus.Text & "'", Conn)
Dr = Cmd.ExecuteReader
Dr.Read()
Refresh()
If Dr.HasRows Then
txtStatus.Text =
Dr.Item("Status")
Exit Sub
End If
End Sub
0 komentar:
Posting Komentar