Group:  Microsoft Access ยป microsoft.public.access.forms
Thread: Populating more than one field from a combo box

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Populating more than one field from a combo box
CT 13.09.2006 15:18:02
Combo boxes are new to me. I created a combo box using the Wizard from a
query that has 4 fields per row. One field in my form is being populated
from the row selected, which is correct. However, 2 other fields in the form
should be populated from the same row selection.

How do I specify which fields should be linked from my combo box into my form?

Please help!
Re: Populating more than one field from a combo box
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 13.09.2006 15:42:14
In the AfterUpdate event, put code like:

Me.Text1 = Me.Combo1.Column(1)
Me.Text2 = Me.Combo1.Column(2)

Note that the Column collection starts at 0: what I'm doing above is moving
the content of the 2nd column of the selected entry to Text1, and the
content of the 3rd column of the selected entry to Text2.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"CT" <CT[ at ]discussions.microsoft.com> wrote in message
news:AE60D054-9F28-4A14-8376-A87B3BB250D3[ at ]microsoft.com...
[Quoted Text]
> Combo boxes are new to me. I created a combo box using the Wizard from a
> query that has 4 fields per row. One field in my form is being populated
> from the row selected, which is correct. However, 2 other fields in the
> form
> should be populated from the same row selection.
>
> How do I specify which fields should be linked from my combo box into my
> form?
>
> Please help!


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net