A friend and I are working on an Access 2007 database on share point for our National Guard unit. We both have limited programming experience, but understand alot.
Situation:
On a form we have a combo box named Troop_List and a text box named Total_Pax.
The combo box queries an excel spreadsheet named Name Data to obtain the field [NAME] and use each entry as the row source.
The user of the form can select any of the names in the drop down box and upon clicking OK, the selected names are outputed to the display area of the combo box.
We want to total the number of names selected in the combo box and input that number to the text box named Total_Pax
We are assuming the proceudre Enter() of Troop_List will be used. Although being many years since either of us programmed VB, we are confident we can figure out how to total the names and input them into the text box. If not we will inquire. We would like to figure as much out on our own as possible.
Problem:
Is there a way to access a property that has the total number of names selected?
If not the row source property of Troop_List quieries the table Name Data. What variables can we use or can we create a loop to count the number of records returned by the query?