Is there a way to create Access table with Yes/No, or Boolean, as data type, programmatically, so that when user opens it using Access, the field appears as checkbox? I'm using DAO 3.60.
Well, you can almost do it. You'd have to create a Property object with Name = "DisplayControl", Type=3, and Value=106, then append it to the table field's Properties collection. Unfortunately, Access made the Property class non-creatable, so you can't create one yourself. I suppose that was to keep you from doing it wrong and causing Access to crash. I don't now any way around this using DAO.
Maybe there's a way, though. Create your table, then open it in design view and use SendKeys to select the field, press F6 to switch to the properties sheet, Ctrl-Tab to select the Lookup page, then type "Check Box" in the field. It ain't pretty, but it just might work. Rick Sprague
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.