combobox1.text
if radiobutton1.checked then
  table1.fieldbyname('..'):=radiobutton1.caption;

解决方案 »

  1.   

    Table1.fieldbyname(ComboBox1.Text).asstring:=Edit.Text;
      

  2.   


    if combobox1.text='昏否' then
    ……
    else if combobox1.text='性别' then
    ……
    是不是这个意思,.text属性表示combobox中选择的文字内容。
      

  3.   

    我用了combobox1.itemindex已经解决了,但是我怎么知道选中了那个单选按钮?
    我用if radiobutton1.checked then
        if radiobutton2.checked then
    好像很麻烦,有没有好的方法,一条语句就能判断呀
      

  4.   

    用radiogroup.
    table1.fieldbyname('marriage').asstring:=radiogroup1.Items.Strings[radiogroup1.ItemIndex]
      

  5.   

    也可以这样的:
    table1.fieldbyname('Sex'):=ComboBox1.Text;
    table1.fieldbyname('Marriage'):=ComboBox2.Text
      

  6.   

    用TRadioGroup控件代替多个TRadioButton控件,TRadioGroup也有ItemIndex属性,试一试!