A
Accessor
Hi all. I have two subforms/subqueries on a main form. I want to be able to
scroll through a field on subform1, and with each new field entered on
subform1, requery subform2, with the value from subform1 being a criteria. I
have this almost working. When opening subform2's query as a query, it works
fine. When I try to do it with my procedure below, I get a prompt for the
ID(primary key field) of the table being queried in subform2. When I hit
enter without providing one, subform2 requeries just fine, as it should. Why
am I getting the prompt for that field in the vba execution? The code is
below, hope this makes sense. Thanks in advance...
Private Sub Symbol_GotFocus()
'When a symbol field from the subquery1 gets focus, put the value of the
field
'into a text box.
Forms!frmQueries!txtSymbol = Symbol
'Requery subquery2. The criteria of the symbol field for this query is the
'text box just updated, txtSymbol.
[Forms]![frmQueries].[Form]![Copy Of qryPointOfIntByEnterSymb
subform2].Requery
End Sub
scroll through a field on subform1, and with each new field entered on
subform1, requery subform2, with the value from subform1 being a criteria. I
have this almost working. When opening subform2's query as a query, it works
fine. When I try to do it with my procedure below, I get a prompt for the
ID(primary key field) of the table being queried in subform2. When I hit
enter without providing one, subform2 requeries just fine, as it should. Why
am I getting the prompt for that field in the vba execution? The code is
below, hope this makes sense. Thanks in advance...
Private Sub Symbol_GotFocus()
'When a symbol field from the subquery1 gets focus, put the value of the
field
'into a text box.
Forms!frmQueries!txtSymbol = Symbol
'Requery subquery2. The criteria of the symbol field for this query is the
'text box just updated, txtSymbol.
[Forms]![frmQueries].[Form]![Copy Of qryPointOfIntByEnterSymb
subform2].Requery
End Sub