A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Set Value Macro



 
 
Thread Tools Display Modes
  #1  
Old March 18th, 2010, 12:15 AM posted to microsoft.public.access
jwebster1979
external usenet poster
 
Posts: 35
Default 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  
Old March 18th, 2010, 12:22 AM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old March 18th, 2010, 03:40 AM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.