Access 2007 query into textbox
Posted on 2009-03-31
I'm new to Access so i hope this question isn't too basic.
This is basically a modification to the "sales pipeline" database (comes with Access 2007) since it had similarities to what i wanted to write. I have an access table called "Employees" where there is a field called "comission_rate", which allows me to log each employees commission rate.
I have a second table called "keystoneopportunities" (to log sales opportunity data) where there is a field called "sales1", which documents who the primary salesman is.
On the form "OpportunityInput", which is the input form for a sales opportunity, i have a combobox for the purpose of selecting a salesman. The control source is "sales1" mentioned earlier. The rowsource is:
SELECT [Employees Extended].ID, [Employees Extended].[Employee Name] FROM [Employees Extended] ORDER BY [Employees Extended].[Employee Name];
this sets the items i see in the combobox dropdown.
Adjacent to the above combobox where i can select an employee, i would like to have their commission rate (which will be used in some calculations later). I'm assuming i would place a textbox for this result to be displayed. Can anyone help me with how to get commission rate to query into this text box? Also, if the commission rate/% is displayed in a textbox, will it be treated as a number (and not text) so that i can use it in calculations?