I have the following query attached to a combobox on a continuous form.
As I move through the records on the form the query operates on the first record even though a message box indicates the table has progressed to the next record.
Why is it so?
The code for the form is super simple.
As I move through the records on the form the query operates on the first record even though a message box indicates the table has progressed to the next record.
Why is it so?
Code:
SELECT Taxon.Genus, Taxon.Family
FROM Taxon
GROUP BY Taxon.Genus, Taxon.Family
HAVING (((Taxon.Family)=[forms]![NilGenus]![txtFamily]))
ORDER BY Taxon.Genus;
The code for the form is super simple.
Code:
Option Compare Database
Option Explicit
Private Sub btnClose_Click()
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "Main Menu"
End Sub
Private Sub Form_Current()
Me.cboGenus.SetFocus
MsgBox Me.txtFamily.Value
End Sub
Private Sub cboGenus_Change()
DoCmd.GoToRecord , , acNext
End Sub