Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm running code that Fills a Dataform <<and all fields are working fine
except for the last two items which are checkboxes: the final step should fill in one of the two separate checkboxes on my frmPOReq, but right now the frmPOReq is showing in some cases BOTH checkboxes checked, with one or the other greyed out on the form... Can someone tell me what I'm doing wrong here? ....Code before,, If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = "" End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = "" End If frmPOReq.Show End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim,
Change: frmPOReq.ChkYes = "" to frmPOReq.ChkYes = False Similarly, change: frmPOReq.ChkNo = "" to frmPOReq.ChkNo = False --- Regards, Norman "Jim May" wrote in message news:QmlZe.121368$Ep.13713@lakeread02... I'm running code that Fills a Dataform <<and all fields are working fine except for the last two items which are checkboxes: the final step should fill in one of the two separate checkboxes on my frmPOReq, but right now the frmPOReq is showing in some cases BOTH checkboxes checked, with one or the other greyed out on the form... Can someone tell me what I'm doing wrong here? ...Code before,, If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = "" End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = "" End If frmPOReq.Show End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Norman,, You nailed-it; (that was the prob)
Tks, Jim "Norman Jones" wrote in message ... Hi Jim, Change: frmPOReq.ChkYes = "" to frmPOReq.ChkYes = False Similarly, change: frmPOReq.ChkNo = "" to frmPOReq.ChkNo = False --- Regards, Norman "Jim May" wrote in message news:QmlZe.121368$Ep.13713@lakeread02... I'm running code that Fills a Dataform <<and all fields are working fine except for the last two items which are checkboxes: the final step should fill in one of the two separate checkboxes on my frmPOReq, but right now the frmPOReq is showing in some cases BOTH checkboxes checked, with one or the other greyed out on the form... Can someone tell me what I'm doing wrong here? ...Code before,, If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = "" End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = "" End If frmPOReq.Show End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim,
I don't know what is causing the problem, there must be some code we aren't seeing. But ... You don't need two checkboxes. If you think about it, a checkbox is just a switch, it is either True (checked) or not True (unchecked). Yes and no are also different switch statuses, so use one checkbox to indicate Yes (checked) or No (unchecked) frmPOReq.chkYesNo = (Target.Offset(0, 17).Value = "Yes") frmPOReq.Show End Sub -- HTH Bob Phillips "Jim May" wrote in message news:QmlZe.121368$Ep.13713@lakeread02... I'm running code that Fills a Dataform <<and all fields are working fine except for the last two items which are checkboxes: the final step should fill in one of the two separate checkboxes on my frmPOReq, but right now the frmPOReq is showing in some cases BOTH checkboxes checked, with one or the other greyed out on the form... Can someone tell me what I'm doing wrong here? ...Code before,, If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = "" End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = "" End If frmPOReq.Show End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
First try
If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = False End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = False End If frmPOReq.Show End Sub -- Regards, Tom Ogilvy "Jim May" wrote in message news:QmlZe.121368$Ep.13713@lakeread02... I'm running code that Fills a Dataform <<and all fields are working fine except for the last two items which are checkboxes: the final step should fill in one of the two separate checkboxes on my frmPOReq, but right now the frmPOReq is showing in some cases BOTH checkboxes checked, with one or the other greyed out on the form... Can someone tell me what I'm doing wrong here? ...Code before,, If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = "" End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = "" End If frmPOReq.Show End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right On !! - Tks Tom
"Tom Ogilvy" wrote in message ... First try If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = False End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = False End If frmPOReq.Show End Sub -- Regards, Tom Ogilvy "Jim May" wrote in message news:QmlZe.121368$Ep.13713@lakeread02... I'm running code that Fills a Dataform <<and all fields are working fine except for the last two items which are checkboxes: the final step should fill in one of the two separate checkboxes on my frmPOReq, but right now the frmPOReq is showing in some cases BOTH checkboxes checked, with one or the other greyed out on the form... Can someone tell me what I'm doing wrong here? ...Code before,, If Target.Offset(0, 17).Value = "No" Then frmPOReq.ChkNo = True frmPOReq.ChkYes = "" End If If Target.Offset(0, 17).Value = "Yes" Then frmPOReq.ChkYes = True frmPOReq.ChkNo = "" End If frmPOReq.Show End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clearing cells without clearing formulas | Excel Discussion (Misc queries) | |||
How to have Checkbox A uncheck with checked Checkbox B | Excel Discussion (Misc queries) | |||
Code question for clearing a command checkbox. | Excel Discussion (Misc queries) | |||
Clearing #N/A's in one go? | Excel Worksheet Functions | |||
Clearing #VALUE | Excel Worksheet Functions |