Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating Text Boxes 1

Status
Not open for further replies.

Freckles

Technical User
May 1, 2000
138
US
I got most of KB Article 322900 to work,

and it is doing EXACTLY what I want it to, except for 0ne thing. I can't get it to put the key field where I want it. Following is what I have.

Private Sub cboNames_AfterUpdate()
Me.[PR3] = Me![cboNames].Column(1)
Me.[ORG5] = Me![cboNames].Column(2)
Me.[PR2 SO] = Me![cboNames].Column(3)
Me.[PR3 SO] = Me![cboNames].Column(4)
Me.[ORG5 SO] = Me![cboNames].Column(5)
Me.[PROD AREA] = Me![cboNames].Column(6)
Me.[PROD AREA SO] = Me![cboNames].Column(7)
Me.[PROD AREA DETAIL] = Me![cboNames].Column(8)
Me.[PROD AREA DETAIL SO] = Me![cboNames].Column(9)

End Sub

Everything is going to the right place, but I am not getting the key field. I tried making the Key Field Column (0), but that blew. Now what

::) Deb Koplen
deb.koplen@verizon.com
koplend@swbell.net (weekends and nights)

A person can stand almost anything except a succession of ordinary days.
 
What is the ordinal position of the 'key' field?

How many fields do you have in the data source of the combo box?

rollie@bwsys.net
 
Thanks for your respolnse. I have a total of 10 fields. The ordinal position of the key field is position 1.

::) Deb Koplen
deb.koplen@verizon.com
koplend@swbell.net (weekends and nights)

A person can stand almost anything except a succession of ordinary days.
 
Deb,

There is a column zero. That is probably the one you are looking for.


do a:

MsgBox Me![cboNames].Column(0)

I have a sample mdb of this if you are interested.

rollie@bwsys.net


 
Sorry I did not get back to you sooner. The Message Box part worked great.

And since that worked, I figured I made a different error. Found that my table had an extra space in the field name. Fixed that and everything SUPER. Thanks

::) Deb Koplen
deb.koplen@verizon.com
koplend@swbell.net (weekends and nights)

A person can stand almost anything except a succession of ordinary days.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top