By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,827 Members | 2,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,827 IT Pros & Developers. It's quick & easy.

how do i display checkbox value from my database MS access in a visual basic 6 form?

P: 1
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
Sep 5 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.