【正确答案】正确答案:【操作步骤】 步骤l:单击工具栏中的“新建”按钮,新建一个表单文件,通过表单控件工具栏向表单中添加两个复选框、一个选项组和两个命令按钮,并将“教师表”和“学院表”添加到表单的数据环境中。 步骤2:设置表单的Name属性为myform,Caption属性为“教师情况”;设置两个命令按钮的Caption属性分别为“生成表”和“退出”;设置两个复选框的Caption属性分别为“系名”和“工资”;两个单选按钮的Caption属性分别为“按职工号升序”和“按职工号降序”。 步骤3:双击“生成表”按钮,为“生成表”命令按钮编写Click事件代码。 *****“生成表”按钮的Click事件代码***** a=ThisForm.Checkl.Value b=ThisForm.Check2.Value c=ThisForm.Optiongroup1.Option1.Value d=ThisForm.Optiongroup1.Option2.Value if a=l and b=1 if c=l select职工号,姓名,系名,工资,课程号from教师表,学院表; where教师表.系号=学院表.系号; order by职工号; into table two.dbf else if d=l select职工号,姓名,系名,工资,课程号from教师表,学院表; where教师表.系号=学院表.系号; order by职工号desc; into table two.dbf endif endif endif if a=l and b=0 if c=l select职工号,姓名,系名,课程号from教师表,学院表; where教师表.系号=学院表.系号; order by职工号; into table one_x.dbf else if d=l select职工号,姓名,系名,课程号from教师表,学院表; where教师表.系号=学院表.系号; order by职工号desc; into table one_x.dbf endif endif endif if a=0 and b=l if c=1 select职工号,姓名,工资,课程号from教师表,学院表; where教师表.系号=学院表.系号; order by职工号; into table one_xx.dbf else if d=1 select职工号,姓名,工资,课程号from教师表,学院表; where教师表.系号=学院表.系号; order by职工号desc; into table one_xx.dbf endif endif endif ************************* 步骤4:保存表单名为myform,按题目要求运行表单并执行相关操作。
【答案解析】