i need help here. how do i display checkbox value from my database MS access in a visual basic 6 form? i hv 2 checkbox in my form, which are Available and Not Available. if the value is yes, i want to display it in Available checkbox and if no, the value will be display in Not Available one.. i did try but when i run my program, the value display in both Available and Not Available checkbox. anybody can give me an idea...??? thanks..
I have used the below code but it didn’t work.
If UCase(rst!RoomAvail) = "YES" Then
CheckBox1.Value = 1 'Available CheckBox
CheckBox2.Value = 0 'Not Availabe CheckBox
Else
CheckBox1.Value = 0 'Available CheckBox
CheckBox2.Value = 1 'Not Availabe CheckBox
End If
-------------------------------------------------
CheckBox1.Value = IIf(UCase(rst!RoomAvail) = "YES",1,0) 'Availabe CheckBox
CheckBox2.Value = IIf(UCase(rst!RoomAvail) = "NO",1,0) 'Not Availabe CheckBox