automatically update field

Hi

I have a combo box with two columns - product & stock code. When I select a 
product I want the the stock code column which I have in my table to 
automatically populate. Is this possible to have on the actual main table?


-- 
Thank you for your help
0
Utf
11/12/2007 2:33:57 PM
access 16762 articles. 2 followers. Follow

2 Replies
543 Views

Similar Articles

[PageSpeed] 40

Yes - you could use the AfterUpdate event of the combo to set the value of 
the control bound to the field holding the stock  code.

But - why ?

You already have the stock code so it seems you want to store it again 
(twice in the same table or - even worse - in another table).  Both of these 
are very bad ideas.  You should use the relationship between the stockcode 
and anything else to run whaever it is you are needing to do.


-- 
Wayne
Manchester, England.



"Kirt84" wrote:

> Hi
> 
> I have a combo box with two columns - product & stock code. When I select a 
> product I want the the stock code column which I have in my table to 
> automatically populate. Is this possible to have on the actual main table?
> 
> 
> -- 
> Thank you for your help
0
Utf
11/12/2007 6:52:01 PM
On Mon, 12 Nov 2007 06:33:57 -0800, Kirt84 <Kirt84@discussions.microsoft.com>
wrote:

>Hi
>
>I have a combo box with two columns - product & stock code. When I select a 
>product I want the the stock code column which I have in my table to 
>automatically populate. Is this possible to have on the actual main table?

First off, you should NOT be working in table datasheets: use a Form instead.

Secondly, most developers recommend that you not use combo boxes in tables (by
all means use them on forms though): see
http://www.mvps.org/access/lookupfields.htm for a critique.

But most important - if the stock code can be unambiguously determined from
the product, then you should NOT store both in any table other than the
product table itself; one of these fields is presumably the primary key of the
product table, and that value is the only one which should be stored in any
other table. You can use a combo box, a query, or other tools to look up the
other field as needed.

             John W. Vinson [MVP]
0
John
11/12/2007 7:43:51 PM
Reply:

Similar Artilces:

A program is trying to automatically send e-mail on your behalf.
I tried posting this in microsoft.public.outlook.general, but no nibbles. ------------------------------------------------------------------------------------------------------ Does anybody know how to turn the "A program is trying to automatically send e-mail on your behalf." prompte off? It pops when one of my MS Access apps is emailing one of it's reports to somebody. It happens on the Citrix server that one of my MS Apps is running on, but it does not happen when the app is running on my own PC. Consequently I'm hoping for some user-configurable setting that controls...

Latest xp update causing Money to crash????
Ever since I installed the latest XP updates, Money 2005 keeps crashing on me. Anyone else experiencing this problem???? No issue here. Have you tried to restore to a point previous to the update? "JRB" <JRB@discussions.microsoft.com> wrote in message news:219988AA-0980-4055-A772-835E45B9DB3F@microsoft.com... > Ever since I installed the latest XP updates, Money 2005 keeps crashing on > me. Anyone else experiencing this problem???? XP: eXtra Pain arthur == On Wed, 22 Mar 2006 09:40:27 -0800, JRB <JRB@discussions.microsoft.com> wrote: >Ev...

Exchange 2000 SP3 updates ans security patches
I have Exchange 2000 Version 6.0 (Build 6249.4: Service Pack 3) running on Windows 2000 Server SP4. What is the best way of checking for missing security patches and updates? Would it be enough if I run MBSA 2.0 and rely on it only? MBSA is not showing any patches/updates missing however the above build number seems to me a lillte old comparing to those I saw when researching the web about Exchange 2000. Does the updates not change the build number? Thank you. "mtler" <mtler@discussions.microsoft.com> wrote: >I have Exchange 2000 Version 6.0 (Build 6249.4: Service Pa...

Inserting a date field
How can I insert a date field into an excel cell. I can do it in Word quite easily but for some reason Excel presents more a a challange. R2D2, =TODAY() will give you today's date, is that what you need? -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "R2D2" <someone@microsoft.com> wrote in message news:1HpHg.16195$Ch.11155@clgrps13... > How can I insert a date field into an excel cell. I can do it in Word qu...

Leopard 10.5.2 combo updater released!
This might help with a lot of the problems Office 2008 users are experiencing. Get this combo updater rather than using Software Updater to download. A combo updater will go back and rewrite files that could be corrupted. Software Updates are incremental updates. Mac OS X 10.5.2 Combo Update: 343 MB <http://www.apple.com/support/downloads/macosx1052comboupdate.html> More on types of update file: <http://www.entourage.mvps.org/troubleshoot/combo.html> -- Diane, Microsoft Mac MVP (MVPs are not Microsoft Employees) Entourage Help Page <http://www.entourage.mvps.org/> Ent...

Automatic CC
Hello, Is there any way to create a template where a contact is automatically CC in the email. So I dont forget to cc them every time I send an email. Thanks ...

Money 2006 constantly faults with automatic updates
Whenever I use the Internet automatic updates, money faults out and wants to send a report to Microsoft. Also my account list shows most accounts with a status of 'Update In Progress' I've done a complete reinstall after removing it and power cycling my machine. I thought it may have been something with removing 2004 and installing 2006, but got same problem Has anyone else been having this problem? I really just want to go back to Money 2004. What's the error message? -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://money.mvps.org/faq f...

Instances doesn't get updated when the master stencil changes
Hi, I am trying to create a stencil master shape in such way that when I change the master, all instances also get updated according to the new master shape. At this point I have a master shape in a stencil and I have hundreds of instances in different visio drawing based on the very same stencil. When I change the master shape, I have to change all instances (several hundreds) and this is such a pain. How can I solve this problem? Any help would be appreciated, Max On Tue, 17 Oct 2006 09:29:15 -0400, "Maxwell2006" <alanalan@newsgroup.nospam> wrote: >Hi, > &...

64 bit language pack and 64 bit cumulative update of december 2009
I want Project Server 2007 64 bits language pack. but i cant find this . In net there is language pack of project server 2007. but there is no define 64 bits. I need 64 bit language pack for 64 bits project server 2007 . and also I need cumulative update (december 2009) of 64 bit project server 2007 and windows sharepoint services 3.0 (64 bit) kindly tell me the correct link from where i will download. ...

Automatic axis format
Hi, I'm need to make a automatic axis format within excel. The number of rows is depending of a imported file. No problem to get the max. number of rows. But to put this number into the chart ( category axis) is more problematic. I try VB but my knowledge is at dummy level ! Waiting for your reply............. Hi, Have a look at Jon's examples of dynamic charts. http://peltiertech.com/Excel/Charts/Dynamics.html Cheers Andy jos wrote: > Hi, > I'm need to make a automatic axis format within excel. > The number of rows is depending of a imported file. > No problem to g...

Update global address book not working!
Hello, I've noticed that users I've setup over the last two days aren't appearing in the global address book in people's outlook but you can see them in the All Users Address book. Can someone inform me how to update this so the user is visable in the global address book. Thanks If you're running Outlook 2003 cached mode you're working off the offline address book, so start looking there. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "John D" <anonymous@discussions.microsoft.com> wrote in message new...

Windows update problem. Clueless
Here is my windowsupdate.log for today, I cannot connect to windowsupdate website period. Not sure what is going on. Can someone help me decode this nonsense? 2010-05-25 17:20:51:671 1484 b98 AU ############# 2010-05-25 17:20:51:671 1484 b98 AU ## START ## AU: Search for updates 2010-05-25 17:20:51:671 1484 678 DnldMgr *********** DnldMgr: Regulation Refresh [Svc: {9482F4B4-E343-43B6-B170-9A65BC822C77}] *********** 2010-05-25 17:20:51:671 1484 678 DnldMgr Contacting regulation server for 20 updates. 2010-05-25 17:20:51:671 1484 b98 AU ######### 2010-05-25 17:20:51:687 1484 ...

How do I get an automatic equal sign to begin the formula bar?
How do I get an automatic equal sign to appear in the formula bar in Excel for Microsoft 2003? This happened for me in the 2000 version and I could just click on it with my mouse pointer, but now all that appears is the function sign with no equal sign after it. It makes my job a lot more time consuming to have to type in the equal sign while building formulas. Please help, anybody? The = icon disappeared in newer versions of excel (xl2002???). You can add an = icon Tools|customize|commands tab|Insert category (Scroll down the list until you find the = icon) And drag it to your fav...

My worksheet automatically adds a fill color when I enter text.
When I type text in a blank cell, the cell automatically is highlightes with the bright yellow fill. There is no conditional formatting on this workbook. Check your VBA editor. You might have an Event Macro which does what, usually, a CF does. Try to Increase the Macro Security to its maximum level in order to eliminate the Event Macro from running... You may, also consider to "rem" all the Macro commands by adding a Preceding apostrophe to each command. Micky > When I type text in a blank cell, the cell automatically is highlightes with > the bright yello...

I open the MDB, the form runs automatically
Simple question I have an MDB file with 20 files and 7 forms in it. When I open it up, the form runs immediately an access goes into some sort of protected mode. I can't view the tables, queries etc. I can see the code by pressing Alt F11 but not the data. I created a blank db and imported the mdb so I could see the tables. But how do I open the original without it running the code? When I look at the code. I don't see anything that sets properties or invokes the code automatically. There are no macros in this, just the forms and associated code with them. Any ideas Thanks Colm ...

Automatic updates, automatically disabling itself
Automatic updates, automatically disabling itself. 2nd day now onecare popped up to tell me the updates turned themselves = off. I'm thinking what malware would want to turn the updates off ? Any idea what's going on here ? Did I AUTOMATICALLY install an update = that caused this ? <keepout@yahoo.com.invalid> wrote in message news:8l7mi5tkgp1gd15fkef71ll5mrui9ukmht@4ax.com... > Automatic updates, automatically disabling itself. > > 2nd day now onecare popped up to tell me the updates turned themselves > off. Drop OneCare and install Microsoft Sec...

How to find a record using more than one field?
I have created a table with several fields such as ID, name, date, etc. I also created a switchboard with a find command to locate a record in forms view . However the find command only searches under one field. Can I create a find command that matches 2 fields? I want my find command to find a record in form view that matches both the ID and date fields. Yes, it is possible. There are several methods that should work. Can you post what method you used to for your find command? Then if you used VBA code we can suggest a modification to the code. John Spencer Access MVP...

Having numbers automatically appear bold
Hi all, Had such great advise last time, thought I'd try again. I have a large range of cells where I will be inputing sales figures i the form of currency revenue. The range is about G-I and 1-400. Th sales data will be a comparisson of YTD 2001 - 2004 revenue results. What I hope to do is have any figure that is above $30,000 appea automatically in bold so as to stand out as a good client. I gues there is something in the IF function to do this but I'm stumped. Any ideas? Thanks again in advance. Saxte -- Message posted from http://www.ExcelForum.com select the range you wa...

Extracting the Contents of a Field
Is there a simple way to extract the text contents from a field and paste as text while retaining the formatting? What works is selecting half the text, copy, paste. Select the other half, copy, paste. If I select it all and paste, I get the field against. I thought paste special might work but has given me no joy. Paste the field and then unlink it (Ctrl+Shift+F9). -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org <faceman28208@yahoo.com> wrote in message news:0c5874a2-14fa-4242-8331-bb2c9abdaa13@h12g2000vbd.g...

Is it possible to automatically move data entered in columns into rows?
Is it possible to automatically move data entered in columns into rows? It seems like a simple thing to do but I can't find a function anywhere. Cheers, Richard Thorneycroft Husky Products If you enter something in ONE cell it is automatically in a row and a column. So, perhaps a bit more explanation is in order. -- Don Guillett SalesAid Software donaldb@281.com "Richard Thorneycroft" <dancecommander81@hotmail.com> wrote in message news:9e2f3f75.0411160750.7003c6ab@posting.google.com... > Is it possible to automatically move data entered in columns into rows? >...

Local Software Update service for Office 2004?
Is it possible to run a local software update server for Microsoft Office on my LAN? With my Xserves, I am using Software Update Service for Apple updates, but can't figure out if there is a way to run a local software update service without using my Internet connection. I can get it from the central servers fine, but was wondering if I could run a local server to manage the Office Updates and monitor the update levels per station. Phillip Remaker wrote: > Is it possible to run a local software update server for Microsoft > Office on my LAN? > > With my Xserves, I am using...

I cant get any updates to install.
Everything is on that is to be on. Any light would be great, thanks. -- Skip Rock Maybe you have them all? "Skip" <Skip@discussions.microsoft.com> wrote in message news:4CCB3033-4CD5-4197-A8A9-C4778A6636DA@microsoft.com... > Everything is on that is to be on. > Any light would be great, thanks. > -- > Skip Rock Skip wrote: > Everything is on that is to be on. > Any light would be great, thanks. Speaking of light... Start button --> RUN (no "RUN"? Press the "Windows Key" + R on your keyboard) --> type...

Crosstab report
I have a report that is based on a Crosstab query with three column headings .. The results of the crosstab query are based on selected rows from a multi list box. If less than three selections are made OR if three selections are made and one column contains No Values, the report fails and does not open. I get the message: "The Microsoft Jet database engine does not recognize " as a valid field name or expression." I open the report in design view and see the error message on the field that does not exist. There are over 2500 rows in my List Box and no way of k...

FW: Try corrective update
--lkdjfwcphrqtozfp Content-Type: multipart/related; boundary="ygblvpmg"; type="multipart/alternative" --ygblvpmg Content-Type: multipart/alternative; boundary="lcxxrzqr" --lcxxrzqr Content-Type: text/plain Content-Transfer-Encoding: quoted-printable MS Consumer this is the latest version of security update, the "November 2003, Cumulative Patch" update which resolves all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three new vulnerabilities. Install now to help maintain the security of yo...

Automatic Forward
How can I automatically forward messages received from a specific sender to another's e-mail person? Thanks, ...