I have a query that totals the number of records related to each person.
In my form I would like to have a unbound text box display the number of records associated to that person.
so i need a IF statement to do the following
if the query field holding names is equal to the form name field, then the target text box equals the value held in querys record_count field.
so something like:
If [query]![person_name] = [form]![person_name] Then
[textbox?] = [query]![record_count]
End If
but Im not sure how to write the complete code in VBA
In my form I would like to have a unbound text box display the number of records associated to that person.
so i need a IF statement to do the following
if the query field holding names is equal to the form name field, then the target text box equals the value held in querys record_count field.
so something like:
If [query]![person_name] = [form]![person_name] Then
[textbox?] = [query]![record_count]
End If
but Im not sure how to write the complete code in VBA