ComboBox の内容を使用して日付をフィルター処理する SQL クエリをプログラムしたいのですが、後者では月を文字で表示したいのですが、クエリには数字を使用する必要があるため、次のコードを使用しました。
procedure TAdh_Filter.RadioButton3Click(Sender: TObject);
var Param : integer;
begin
if ComboBox1.Text = 'January' then begin Param := 1; end
else if ComboBox1.Text = 'February' then begin Param := 2; end
else if ComboBox1.Text = 'March' then begin Param := 3; end
else if ComboBox1.Text = 'April' then begin Param := 4; end
else if ComboBox1.Text = 'May' then begin Param := 5; end
else if ComboBox1.Text = 'June' then begin Param := 6; end
else if ComboBox1.Text = 'July' then begin Param := 7; end
else if ComboBox1.Text = 'August' then begin Param := 8; end
else if ComboBox1.Text = 'September' then begin Param := 9; end
else if ComboBox1.Text = 'October' then begin Param := 10; end
else if ComboBox1.Text = 'November' then begin Param := 11; end
else if ComboBox1.Text = 'December' then begin Param := 12; end
end;
これを簡素化できるかどうか知りたいです。