From: Keith G Hicks on
I have a form with over 80 text boxes on it. They should be checkboxes.
Rather than plopping 80+ checkbox objects on the form and manually assigning
labels, checkbox names and sources I would like to figure out how to edit
the source. In Delphi I can edit the source file VERY easily and change text
boxes to checkboxes lickity split. Piece of cake. Ugh. I hate mdb's for this
reason. I can right click a text box and change it to a combo box but the
option to change to a checkbox is grayed out. Again, ugh. So is this
possible or am I stuck spending an hour or so mucking my way through this
manually???

Thanks,

Keith

Oh, and it's an ADP, not an MDB to be exact. But a forms a form, right? The
problem is that I can't find a hidden/ssytem table that has this info in it.


From: Keith G Hicks on
The only thing I can think of is to add the checkboxes to the form
programatically but I'm getting nowhere with that. All the posts out there
where people ask how to do this are answered with "YOu should not do that".
What a crock. Sometiems there is a reason for somethign that someone else
might not understand. I can see why it might be a bad idea to do this on a
regular basis with the same form over and over again but that's not what I'm
doing. I need to add these only once and then the form is done. Can someone
show me how to do this or point me to where it's shown?

Thanks,

Keith

"Keith G Hicks" <krh(a)comcast.net> wrote in message
news:OHWpkes0KHA.752(a)TK2MSFTNGP04.phx.gbl...
>I have a form with over 80 text boxes on it. They should be checkboxes.
>Rather than plopping 80+ checkbox objects on the form and manually
>assigning labels, checkbox names and sources I would like to figure out how
>to edit the source. In Delphi I can edit the source file VERY easily and
>change text boxes to checkboxes lickity split. Piece of cake. Ugh. I hate
>mdb's for this reason. I can right click a text box and change it to a
>combo box but the option to change to a checkbox is grayed out. Again, ugh.
>So is this possible or am I stuck spending an hour or so mucking my way
>through this manually???
>
> Thanks,
>
> Keith
>
> Oh, and it's an ADP, not an MDB to be exact. But a forms a form, right?
> The problem is that I can't find a hidden/ssytem table that has this info
> in it.
>


From: Keith G Hicks on
Never mind. I figured it out.


Dim frm As Form
Dim ctlChk As Control
Dim ctlChkTop As Double
Dim ctlLbl As Control
Dim ctlLblTop As Double

DoCmd.OpenForm "frmEditHolidayDates_subform", acDesign

Set frm = Forms("frmEditHolidayDates_subform")

ctlChkTop = 1.2292
ctlLblTop = 1.2083

Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "SELECT County FROM tblCounties WHERE County <> '*** UNKNOWN
COUNTY' ORDER BY County", cnnCurrProj, adOpenStatic
While Not rs.EOF

Set ctlChk = CreateControl(frm.Name, acCheckBox, acDetail, ,
rs!County, 0.7083 * 1440, ctlChkTop * 1440)
Set ctlLbl = CreateControl(frm.Name, acLabel, , ctlChk.Name,
rs!County, 0.8681 * 1440, ctlLblTop * 1440)

rs.MoveNext

ctlChkTop = ctlChkTop + 0.2292
ctlLblTop = ctlLblTop + 0.2292
Wend




From: John W. Vinson on
On Fri, 2 Apr 2010 20:50:15 -0400, "Keith G Hicks" <krh(a)comcast.net> wrote:

>I have a form with over 80 text boxes on it. They should be checkboxes.

Ummm... probably not!

They should almost certainly be ONE control in 80 records in a related table.

What are your tables? How are they related?

>Rather than plopping 80+ checkbox objects on the form and manually assigning
>labels, checkbox names and sources I would like to figure out how to edit
>the source. In Delphi I can edit the source file VERY easily and change text
>boxes to checkboxes lickity split. Piece of cake. Ugh. I hate mdb's for this
>reason. I can right click a text box and change it to a combo box but the
>option to change to a checkbox is grayed out. Again, ugh. So is this
>possible or am I stuck spending an hour or so mucking my way through this
>manually???

It depends on what is in the checkbox. A checkbox allows only two choices: -1
for True, 0 for False. If the textbox contains text strings like "Yes" or
"No", it won't allow that choice.

>Thanks,
>
>Keith
>
>Oh, and it's an ADP, not an MDB to be exact. But a forms a form, right? The
>problem is that I can't find a hidden/ssytem table that has this info in it.

It's a flawed table design, whatever frontend you're using.
--

John W. Vinson [MVP]
From: John W. Vinson on
On Fri, 2 Apr 2010 21:37:26 -0400, "Keith G Hicks" <krh(a)comcast.net> wrote:

>Never mind. I figured it out.
>

I'm glad you found a way to dig yourself deeper into your flawed design to
your satisfaction, and I apologize for offering to help.
--

John W. Vinson [MVP]