Add the combo box to the form. Set its Row Source to a query that returns
the initials from the table that lists the initials. The wording in your
first sentence is confusing. Is the Initials field the field that the two
tables are joined on? Is the table that lists the initials also called
initials?
Example:
SELECT [Initials].[Initials] FROM [Initials] ORDER BY [Initials]
Then add the textbox. Set the Control Source of the textbox to
=DCount("*", "[NameOfOtherTable]", "[Initials]='" & cboNameOfCombo & "'")
This will make the textbox a calculated control. You shouldn't need a VBA
event to do this.
--
Wayne Morgan
Microsoft Access MVP
"Paolo" <jp***@tin.it> wrote in message
news:9f**************************@posting.google.c om...
Friends, I have a table with a field named Initials which has its
record source to another table named Initials.
I would like to add on a form named Welcome two controls:
A combo box, which displays the initials of all my database users and
a text box which calculated the number of records associated to the
selected user.
I would like to use the OnChange event of the combo to run the query
or the calculation code.
Is there a way I can do this?
Thanks.