Hi,
I'm creating a form with a set of three option buttons. They are bound to a field in the database. When I add a record to the database and optOpResource is selected, 1 is saved to the database (should be 3). When I bring the item back to the form optOpCostOnly is selected (should be optOpResource). When I select optOpResource and then update, 3 is saved to the database (this is correct). Why does it not put 3 into the field when I add the record; but does when I update it? Of course the update wouldn't have been necessary if it were added correctly in the first place. The code to create the option buttons is below. Any ideas? I'm on 2007 A PL47.
Thanks,
Mike
[Code]
Dim optOpCostOnly As SAPbouiCOM.OptionBtn 'optOperation As SAPbouiCOM.OptionBtn
Dim optOpResource As SAPbouiCOM.OptionBtn ' new
Dim optResource As SAPbouiCOM.OptionBtn
(should be 1)
optOpCostOnly = oWrkForm.Items.Item("optOpCost").Specific
optOpCostOnly.DataBind.SetBound(True, "@NBS_RESOURCE", "U_NBS_Function")
oWrkForm.Items.Item("optOpCost").AffectsFormMode = True
(should be 2)
optResource = oWrkForm.Items.Item("optRes").Specific
oWrkForm.Items.Item("optRes").AffectsFormMode = True
optResource.GroupWith("optOpCost")
(should be 3)
optOpResource = oWrkForm.Items.Item("optOpRes").Specific
oWrkForm.Items.Item("optOpRes").AffectsFormMode = True
optOpResource.GroupWith("optOpCost")