掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
2つの条件に合うレコードを抽出するには? (ID:122160)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Filterを使わずに、SQLのWHERE句で指定するのはダメですか? cn.Open Set rst = New ADODB.Recordset rst.Source = "SELECT * FROM 記録 WHERE " & _ "年月日 like '*" & Text3.Text & "*' " & _ "AND 図書名 like '*" & Text6.Text & "*'" rst.ActiveConnection = cn rst.CursorType = adOpenStatic rst.Open With rst .MoveFirst Do Until .EOF Text4.Text = Text4.Text & vbCrLf & _ rst!年月日 & _ " : " & rst!発行所 & _ " 図書名 : " & rst!図書名 & _ " 単価 : " & rst!単価 & _ " 冊数 : " & rst!冊数 & _ " 金額 : " & rst!金額 .MoveNext Loop End With rst.Close cn.Close Set rst = Nothing Set cn = Nothing
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.