|
-
Jun 25th, 1999, 04:56 PM
#1
Thread Starter
Lively Member
How do you code checkboxes to show up whether you are adding the data by ticking the check box or editing it. I have the following code to load a checkbox in the form load section but it returns an Data Type converion error.
If Check1(0).Value Then
mRstrans!LightEater = "Yes"
Else
mRstrans!LightEater = "No"
End If
i have tried check1(0).value = 0 then , changed the no to "" and i still cant get it to work. If you have any ideas i would be greatful and will thank you in advance.
-
Jun 28th, 1999, 12:01 AM
#2
New Member
Try "True" or "False". If you check box is bound to a field in your table besure the field data type is set to "Yes/No"
Hope this works okay for you.
Duane
-
Jun 28th, 1999, 04:57 AM
#3
Thread Starter
Lively Member
Thanx Mildumar, I figured out my problem, I had the code the wrong way around and the true/false had the same error come up. The code I now use is:
If mrstrans!LightEater Then
Check1(0).Value = 1
Else
Check1(0).Value = 0
End If
This loads the checkbox with the ticks established from the database which is what I wanted it to do. But thanx anyway.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|