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 matching to entire record
I have a combo box on a form that contains ID numbers and various other
fields from the table. I want to be able to select the ID number from the combo box and have it populate other fields from the individual record. I was thinking I needed to enter something for "after update" on the properties for after selecting the ID number, but have not been able to get it to work. Any suggestions? |
#2
|
|||
|
|||
Combo Box matching to entire record
Use:
Me.filter = "[id] = """ & Me.combo# & """" Me.filteron = True Put this in the afterupdate of the combo. Your combo# will be listed, like combo10 or combo18. -- Milton Purdy ACCESS State of Arkansas "Kathy" wrote: I have a combo box on a form that contains ID numbers and various other fields from the table. I want to be able to select the ID number from the combo box and have it populate other fields from the individual record. I was thinking I needed to enter something for "after update" on the properties for after selecting the ID number, but have not been able to get it to work. Any suggestions? |
#3
|
|||
|
|||
Combo Box matching to entire record
Once you have selected a record in your combo box (called combo1 and having
several columns 0-5) you can assign values from each of the columns to controls on your form using the column property of the combo box. Column counts start with ZERO to copy the first three columns of hte combo box into three controls on you form (text1 text2 text3) in the after update event of the combo box place code like this (replacing text1, combo1 etc with your names) me.text1=me.combo1.column(0) me.text2=me.combo1.column(1) me.text3=me.combo1.column(2) Tom "Kathy" wrote in message ... I have a combo box on a form that contains ID numbers and various other fields from the table. I want to be able to select the ID number from the combo box and have it populate other fields from the individual record. I was thinking I needed to enter something for "after update" on the properties for after selecting the ID number, but have not been able to get it to work. Any suggestions? |
#4
|
|||
|
|||
Combo Box matching to entire record
On Fri, 22 Jan 2010 11:47:02 -0800, Kathy
wrote: I have a combo box on a form that contains ID numbers and various other fields from the table. I want to be able to select the ID number from the combo box and have it populate other fields from the individual record. I was thinking I needed to enter something for "after update" on the properties for after selecting the ID number, but have not been able to get it to work. Any suggestions? If you're trying to copy field values from one table (the combo's rowsource) into a different table (the form's recordsource).... DON'T. Storing data redundantly is almost always A Bad Idea. Could you explain just what you're trying to accomplish with this? -- John W. Vinson [MVP] |
#5
|
|||
|
|||
Combo Box matching to entire record
I'm trying to create a form that has look up information on one side and data
entry information on the other side. I want to be able to have the combo box on the look up side where someone could choose the ID number for the record they are looking for and the corresponding field information would appear so they could verify they have the correct record. Then, I want them to be able to enter information on the data entry side for additional information related to that record. "John W. Vinson" wrote: On Fri, 22 Jan 2010 11:47:02 -0800, Kathy wrote: I have a combo box on a form that contains ID numbers and various other fields from the table. I want to be able to select the ID number from the combo box and have it populate other fields from the individual record. I was thinking I needed to enter something for "after update" on the properties for after selecting the ID number, but have not been able to get it to work. Any suggestions? If you're trying to copy field values from one table (the combo's rowsource) into a different table (the form's recordsource).... DON'T. Storing data redundantly is almost always A Bad Idea. Could you explain just what you're trying to accomplish with this? -- John W. Vinson [MVP] . |
#6
|
|||
|
|||
Combo Box matching to entire record
On Fri, 22 Jan 2010 14:18:01 -0800, Kathy
wrote: I'm trying to create a form that has look up information on one side and data entry information on the other side. I want to be able to have the combo box on the look up side where someone could choose the ID number for the record they are looking for and the corresponding field information would appear so they could verify they have the correct record. Then, I want them to be able to enter information on the data entry side for additional information related to that record. Is the "additional information" in the same table? Or is it in a separate (many side) table, which could be edited in a Subform? It *SOUNDS* like what you want to do is to use a combo box to locate and display an existing record. If so, use the Toolbox Combo Box Wizard to create a combo "Use this combo to find a record". The user shouldn't need to even SEE an ID number, unless ID numbers are in routine use out in the real world. You can display (without storing) information from multiple columns in the combo box by having textboxes with control sources like =comboboxname.Column(n) where (n) is the zero based index of the field - e.g. if the Phone is the fifth column of the combo's row source query, use (4). -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|