If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Set Value Macro
I have Two Tables one table has a combo box with an tblEmployeeSalary. the
other table I have is called tblSalaryHours. In tblEmployeeSalaries I have a combo box called Salary which represents the Annual salary of the employee. I want to use the Set Value Macro to paste that salary value in to my other in a text box in a form called currentsalary. Any suggestions please keep it simple and be specific as you can kind of dumb with this stuff!! |
#2
|
|||
|
|||
Set Value Macro
If you have a "table [with] a combo box", you must be using the lookup
datatype. This causes considerable confusion, since any time you look directly in the table (probably shouldn't be doing that anyway!), what you see in that field is NOT what Access has stored in that field. The consensus of folks here in the newsgroups is that lookup datatypes are confusing and cause more problems than they solve. Besides, you really shouldn't be working directly in the tables anyway. They may look like spreadsheets but they are NOT! Instead, use Access queries to retrieve data from the tables and Access forms to display it. In the form, use a combobox to look up values, storing the looked-up value's rowID, but displaying the looked-up value. Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "jwebster1979" wrote in message ... I have Two Tables one table has a combo box with an tblEmployeeSalary. the other table I have is called tblSalaryHours. In tblEmployeeSalaries I have a combo box called Salary which represents the Annual salary of the employee. I want to use the Set Value Macro to paste that salary value in to my other in a text box in a form called currentsalary. Any suggestions please keep it simple and be specific as you can kind of dumb with this stuff!! |
#3
|
|||
|
|||
Set Value Macro
On Wed, 17 Mar 2010 16:15:02 -0700, jwebster1979
wrote: I have Two Tables one table has a combo box with an tblEmployeeSalary. the other table I have is called tblSalaryHours. In tblEmployeeSalaries I have a combo box called Salary which represents the Annual salary of the employee. I want to use the Set Value Macro to paste that salary value in to my other in a text box in a form called currentsalary. Any suggestions please keep it simple and be specific as you can kind of dumb with this stuff!! Please explain your table structure. It makes no sense to me to have a *combo box* called Salary; salary would ordinarily be a Currency data field, potentially different for each employee (due to raises, employment history, grade, etc.) Where is this combo box looking up the salary FROM? Please explain the fields in your table, and the Recordsource of the form (open the form in design view, view its Properties, find the Recordsource property on the Data tab; click the ... icon by it to open a query window, select View... SQL, and post the SQL text here). -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|