After update event does not display all relevant fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a combo box on a form which is unbound. However it is drawing data from
a row source which is actually a joined sql statment. Now, there are few
other text boxes on the form which are unbound. However, on selecting one
particular row of the combo box, the data corresponding to that record should
display in the text box.

Now the following are the code to fill up the text boxes
Private Sub cboSelectBlockGrant_AfterUpdate()

Me.Desc = Me.cboSelectBlockGrant.Column(2)
Me.FedNo = Me.cboSelectBlockGrant.Column(3)
Me.Year_mod = Me.cboSelectBlockGrant.Column(4)
Me.Code_mod = Me.cboSelectBlockGrant.Column(5)
Me.AwardAmount_mod = Me.cboSelectBlockGrant.Column(6)
Me.Refresh

End Sub

However, the form only displays the contents of column(2) and column(3)
of the row source of the combo box and not the contents of column(4),
column(5) and column(6). I have no idea of knowing why some of the text
boxes are not getting filled in.

Any help is highly Appreciated.
 
Hi John

Do the other three columns didplay when you drop down the list? It sounds
like the Columns property of your combo is set to 4, when it should be 7.

Also, if the textboxes are for display only and don't need to be edited, you
can set their controlsource to directly reference the column. For example,
set the controlsource of Year_mod to:
=cboSelectBlockGrant.Column(4)
 
Didn't John Vinson just answer this question for you?

If his answer did not solve the problem, then please reply *to the same
thread* with some further information. Don't waste everybody's time by
reposting exactly the same question in a new thread.
 
Back
Top