UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Datasheet View And Checkbox    
 
   
ron513
post Apr 3 2012, 08:04 AM
Post #1

UtterAccess Member
Posts: 37



When viewing a form in datasheet view that has a yes/no check box how do I have the data show as yes or no and not a check box?

Thanks

Ron
Go to the top of the page
 
+
MiltonPurdy
post Apr 3 2012, 08:06 AM
Post #2

UtterAccess Ruler
Posts: 1,621
From: Arkansas



In your query that drives the form:

Since a checkbox generates a 0 for no and a -1 for yes:

IIF([yourcheckboxfield}=-1,"yes","no")
Go to the top of the page
 
+
ron513
post Apr 3 2012, 08:20 AM
Post #3

UtterAccess Member
Posts: 37




I apologize for my inexperience but how do I identify the query that drives my form?
Go to the top of the page
 
+
MiltonPurdy
post Apr 3 2012, 08:38 AM
Post #4

UtterAccess Ruler
Posts: 1,621
From: Arkansas



Go to design view on your from (right click select design view)

In the upper left hand corner click on the box. The box should turn black.

Now right click on the box and select properties.

Look for the controlsource property. That should tell you what is controlling the form.

Good Luck!
Go to the top of the page
 
+
missinglinq
post Apr 3 2012, 09:35 AM
Post #5

UtterAccess Ruler
Posts: 2,659



Also note that Milton had a typo in his code:

IIF([yourcheckboxfield}=-1,"yes","no")

should be

IIF([yourcheckboxfield]=-1,"yes","no")


Linq ;0)>
Go to the top of the page
 
+
MiltonPurdy
post Apr 3 2012, 09:37 AM
Post #6

UtterAccess Ruler
Posts: 1,621
From: Arkansas



Thanks!

I fat fingered that one!

Milt
Go to the top of the page
 
+
ron513
post Apr 3 2012, 10:47 AM
Post #7

UtterAccess Member
Posts: 37



Thanks for the quick responces.

I did not see a Control Source property but the Record Source is a table and the Record Set Type is Dynaset.
Go to the top of the page
 
+
MiltonPurdy
post Apr 3 2012, 11:22 AM
Post #8

UtterAccess Ruler
Posts: 1,621
From: Arkansas



OK, the recordsource is a table and you need to build a query to drive it from.

Use the query builder and drag the field names down.

Then use the IIF staement I gave you in one of the fields.

If you have trouble, post back.

Good luck!
Go to the top of the page
 
+
ron513
post Apr 3 2012, 02:55 PM
Post #9

UtterAccess Member
Posts: 37



I’m apparently making this a harder than it should be.

This is what I tried. In design view of the form > properties > record source > using query builder I dropped the fields in the query I want in the form. I entered the statement you provided, using my checkbox field name, in one of the field cells. I saved and closed. When I open the form in datasheet view the check box is still visible rather than yes or no. What am I doing wrong?
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 01:37 AM