问题描述
我正在尝试随机化我的过滤器。我有一个表格,其记录的可能值为Easy,Medium或Hard。
用户通过组合框进行选择。选择之后我会像这样激活Filter属性
Private Sub cboDifficulty_Click()
Dim strFilterDifficulty As Variant
strFilterDifficulty =表格!frmGuess.cboDifficulty
Me.Filter =" Word_Difficulty =''" &安培; strFilterDifficulty& "''"
Me.FilterOn = True
Me.txtAnswer = Word_Description
''得到单词的长度
调用WordLength(Me.txtAnswer)
结束子
根据组合框值过滤我的记录集,从1开始次数。它显然总是以相同的顺序出现。我想做的是每次随机化订单。
任何想法?
I am trying to randomize my filter. I have a table with a record that has a possible value of "Easy", "Medium", or "Hard".
The user makes a choice by a combo box. After it is chosen I activate the Filter property like so
Private Sub cboDifficulty_Click()
Dim strFilterDifficulty As Variant
strFilterDifficulty = Forms!frmGuess.cboDifficulty
Me.Filter = "Word_Difficulty = ''" & strFilterDifficulty & "''"
Me.FilterOn = True
Me.txtAnswer = Word_Description
'' get the length of the word
Call WordLength(Me.txtAnswer)
End Sub
This filters my recordset based on the combo box value and starts at the 1st occurance. It always appears in the same order obviously. What I would like to do is randomize the order each time.
Any ideas?
推荐答案
这篇关于随机化过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!