# Re: 资料库变动问题

Posted by wave on December 04, 1998 at 11:34:29:

In Reply to: 资料库变动问题 posted by 乖乖 on December 04, 1998 at 10:48:00:

: 我有一段程式如下:
: 程式一开启时
: datIn.DatabaseName = App.Path & "\..\MDB\kk.mdb"
: datIn.RecordSource = "进货资料表"
: 尔后要查询时,程式如下:
: Txtq1 = InputBox("请选择要查询之料号", "查询", "01-0001")
: Txtq2 = InputBox("请选择要查询之起始日期", "查询", "1971/4/26")
: Txtq3 = InputBox("请选择要查询之结束日期", "查询", "1996/5/20")
: datIn.RecordSource = "select * from [进货资料表] where [料号]='" & Txtq1 & "' And [日期] >= #" & Txtq2 & "# And [日期] <= #" & Txtq3 & "#"
: 而DBGrid.DataSource=datIn,但似乎没有作用,整个资料表在显示时,不会经过查询过后的筛选条件变动,请问程式哪里出了问题?

加datIn.refresh

Follow Ups: