L
LDMueller
In Access 2003, I have a form named frmEvalWho. On this form I have a
command button and it's coded as follows:
Private Sub cmdEvalAssoc_Click()
Dim stDocName As String
Dim stLinkCriteria As String
Dim intEval As Variant
Dim intAssoc As Variant
stDocName = "frmAssocEval"
DoCmd.OpenForm stDocName, , , stLinkCriteria
intEval = Evaluator.Value
intAssoc = Associate.Value
Forms!frmAssocEval.Form.Evaluator.Value = intEval
Forms!frmAssocEval.Form.Associate.Value = intAssoc
End Sub
All this works fine to the extent the form opens on the record of what was
entered in the values of Evaluator.Value and Associate.Value. However, at
the bottom of my form, I see it's Record 1 of 139.
Now if I put the prompts in the criteria field of a query instead of using
the code above, I still get the same record, however, it shows Record 1 of 1.
Is there any way to code the form so when the code is ran, I'll end up
getting Record 1 of 1.
I need this to ensure my users won't accidentally go to another record and I
need to be able to code the filter instead of putting the prompt in the query
criteria.
I'm thinking I need to use the the following, but am unsure how to code it.
Filter = "...."
FilterOn = True
I hope all this makes sense. Thanks in advance for your assistance.
LDMueller
command button and it's coded as follows:
Private Sub cmdEvalAssoc_Click()
Dim stDocName As String
Dim stLinkCriteria As String
Dim intEval As Variant
Dim intAssoc As Variant
stDocName = "frmAssocEval"
DoCmd.OpenForm stDocName, , , stLinkCriteria
intEval = Evaluator.Value
intAssoc = Associate.Value
Forms!frmAssocEval.Form.Evaluator.Value = intEval
Forms!frmAssocEval.Form.Associate.Value = intAssoc
End Sub
All this works fine to the extent the form opens on the record of what was
entered in the values of Evaluator.Value and Associate.Value. However, at
the bottom of my form, I see it's Record 1 of 139.
Now if I put the prompts in the criteria field of a query instead of using
the code above, I still get the same record, however, it shows Record 1 of 1.
Is there any way to code the form so when the code is ran, I'll end up
getting Record 1 of 1.
I need this to ensure my users won't accidentally go to another record and I
need to be able to code the filter instead of putting the prompt in the query
criteria.
I'm thinking I need to use the the following, but am unsure how to code it.
Filter = "...."
FilterOn = True
I hope all this makes sense. Thanks in advance for your assistance.
LDMueller