If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
change textbox to checkbox
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. |
#2
|
|||
|
|||
change textbox to checkbox
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" wrote in message ... 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. |
#3
|
|||
|
|||
change textbox to checkbox
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 |
#4
|
|||
|
|||
change textbox to checkbox
On Fri, 2 Apr 2010 20:50:15 -0400, "Keith G Hicks" 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] |
#5
|
|||
|
|||
change textbox to checkbox
On Fri, 2 Apr 2010 21:37:26 -0400, "Keith G Hicks" 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] |
#6
|
|||
|
|||
change textbox to checkbox
What a shmuck. My "Never mind. I figured it out" was posted a good hour
before your attempt at a solution. I never cease to be amazed at how obnoxiuos and unkind folks can be in the MS newsgroups. You don't know enough about what I'm doing to make that judgement. I'm sorry you *tried* to help as well. If you've nothing constructive to say, don't bother. I spent a lot of time in the Borland Delphi newsgroups a few years ago on a big project. It was like a breath of fresh air. 99% of the people there were genuinely kind and helpful no matter what you were trying to do. And if they felt that you could do something a little more efficiently, they didn't feel the need to be rude about it. "John W. Vinson" wrote in message ... On Fri, 2 Apr 2010 21:37:26 -0400, "Keith G Hicks" 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] |
Thread Tools | |
Display Modes | |
|
|