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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box



 
 
Thread Tools Display Modes
  #1  
Old August 23rd, 2004, 08:23 PM
bladelock
external usenet poster
 
Posts: n/a
Default Combo Box

Hi all,

I have a table "History" with four fields A1(text), B1(text), C1(num),
D1(text) and table "Datx" with two fields N1(text),Ref(num). Now, on my form
"MyInput" I want to place a combo box on my form that will store the
information from "Datx" but I want to store both fields "N1" and "Ref" to
table "History" A1 and C1 respectfully.

I know I can use the wizard to create to combo box, but it will only store
one field when the user selects from the drop down. How do I get to store
both fields as the user select the drop down screen in a combo box.

Thanks
  #2  
Old August 23rd, 2004, 09:30 PM
Kevin Sprinkel
external usenet poster
 
Posts: n/a
Default

In *most* instances, it is undesirable to store this data
redundantly, since you can display it on a form using the
Column property of the combo box, or by using a query
joining the two tables.

This strategy is recommended when the "lookup" table data
is static. If, however, the text associated with a given
Ref will change over time, you'd want to capture its value
at the time the record was entered or edited.

The easiest way is to do so is to include the Text as a
column in the Row Source of the combo box, and use the
AfterUpdate event to place the corresponding value into a
disabled control bound to the A1 field. Assuming the text
is the second column (index=1), the code is:

Me![A1] = Me!YourComboBoxName.Column(1)

HTH
Kevin Sprinkel


-----Original Message-----
Hi all,

I have a table "History" with four fields A1(text), B1

(text), C1(num),
D1(text) and table "Datx" with two fields N1(text),Ref

(num). Now, on my form
"MyInput" I want to place a combo box on my form that

will store the
information from "Datx" but I want to store both

fields "N1" and "Ref" to
table "History" A1 and C1 respectfully.

I know I can use the wizard to create to combo box, but

it will only store
one field when the user selects from the drop down. How

do I get to store
both fields as the user select the drop down screen in a

combo box.

Thanks
.

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't allow select in combo box Sue-Fong Using Forms 7 July 21st, 2004 02:06 PM
Combo box value determined by the value of another combo box LouD General Discussion 8 July 9th, 2004 08:45 PM
Cascading Combo Boxes Tom Using Forms 1 June 9th, 2004 02:04 AM
Combo Box Problem Charles Using Forms 0 May 28th, 2004 09:15 PM


All times are GMT +1. The time now is 06:19 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.