Text Box updates based on combo, based on a linked table

A

awrex

I'm probably missing something in the posts, but I don't think I've seen this.

I have a series of cascading combo boxes and on the last combo box I want a
text box to be updated with data that is part of the same record set, though
it's not in the combo box, but part of the same linked table.

Hope this makes sense.

I've tried using a afterupdate on the last combo box but I get an error
METHOD OR DATA MEMEBER NOT FOUND.

I figure it's the table that I'm trying to reference, the table is outside
the form though it's linked.

Private Sub Project_ID_AfterUpdate()
Me.txtProj = Me.tbl_project.Column(2)
End Sub


THANKS!!!!!!!!!
 
T

TonyT

Hi again awrex,

You can't reference a table by column in that fashion i'm afraid, either you
need to do a dLookup to return the correct info, or if you can, add the
required field to your query / recordsource for the combobox, hide it (column
width 0) and then use

Me.txtProj = Me.Project_ID.Column(x) ' where x is the number of the new
(hidden) column containing the data (starting from (0)).

TonyT..
 
S

Sue

Tony

I have read your reply to "awrex" below which I have been able to do in the
past, in previous instances i have only wanted to update 2 text fields with
data from a combo box selection. But now I would like to update 4 fields in
the same manner but I only seem to be able to get 2 of the fields to update
and the other 2 remain blank. Am I able to do this, this way?

Appreciate your time with this.

Regards

Sue
 
Top