自己写的总是多 一个AND 郁闷啊帮忙啊
Sql_Where=""
If item_name_box = "" Then
Sql_Where = Sql_Where & ""
Else
Sql_Where = Sql_Where & "item_name like '%" & item_name & "%' and "
End If
If Item_unit_box = "" Then
Sql_Where = Sql_Where & ""
Else
Sql_Where = Sql_Where & "Item_unit like '%" & Item_unit & "%' and "
End If
sql ="Select * From kjxmgl where "&sql_where&" order by id desc"
只要选择了总是多一个 帮忙啊