| 发表于:2007-01-25 17:46:50 楼主 |
请先看这段代码: if keyascii = 13 then dim str as string dim str1 as string dim rs as adodb.recordset str = "select max(bed_no) from bed_rec where ward_code= '030809 ' " set rs = EXECutesql(str, true) if rs.fields(0) < int(text1.text) then '输入的床位号大于最大床位号,则符合床位要求,可以查看该床位是否有病人 msgbox "没有该床位号,请重新输入! ", vbokonly + vbexclamation, "注意 " exit sub end if end if str1 = "select t1.name,t1.patient_id,t1.sex,t1.inp_no,t1.charge_type,t2.bed_no,t2.prepayments, " _ & "t2.admission_date_time,t2.dept_code,t2.nursing_class,t2.diagnosis,t2.patient_id, " _ & "t2.patient_condition,t2.adm_ward_date_time,t2.operating_date,t2.doctor_in_charge " _ & "from pat_master_index t1,pats_in_hospital t2 " _ & "where t1.patient_id=t2.patient_id and t2.ward_code= '030809 ' " set rs = EXECutesql(str1, true) label20.caption = rs.fields(0) 我就是想在label20中显示出所查出来的字段,但是一运行就错误提示说“未找到预期from关键字” 请问怎么办???谢谢 |
|
|
|
|