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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |