txtbox to fill based on combobox data

  • Thread starter Thread starter cableguy47905 via AccessMonster.com
  • Start date Start date
C

cableguy47905 via AccessMonster.com

This is on an unbound form. This is what I have:
cboGroup
cboVerb
lstFormat
txtDesc

Right now I have cboGroup based on a small query.
cboVerb is based on a query that has forms.FRM_Verbs.cboGroup as the
criteria.
I have lstFormat being updated from a query that has forms.FRM_Verbs.cboVerb
as the criteria.
The after update() for cboVerb is:

Private Sub Verb_AfterUpdate()

Me.lstFormat.Requery
Me.txtDesc = Me.lstFormat.Column(2)

End Sub



There are 3 columns for lstFormat
Description is in the last column. I understand that the first column is
actually 0.

I still get a blank text box. I can substitute "test data" for Me.lstFormat.
column(2) and I do see that show up. Does anyone know what I am doing wrong?

Thanks,
Lee
 
Me.lstFormat.Requery ??

Are you sure that is right? That is the form, not the query itself....I
think....

If you look at the result of the query is it showing data?
 
I have a requery macro for the cboVerb in the AfterUpdate for cbogroup, then
I changed the code for cboVerb to the following:

Private Sub cboVerb_AfterUpdate()
Dim strDesc As String
strDesc = ""
strDesc = DLookup("Description", "QRY_Verbs")
Me.txtDesc = strDesc
Me.lstFormat.Requery
End Sub

It works now, Thanks

Me.lstFormat.Requery ??

Are you sure that is right? That is the form, not the query itself....I
think....

If you look at the result of the query is it showing data?
This is on an unbound form. This is what I have:
cboGroup
[quoted text clipped - 25 lines]
Thanks,
Lee
 
Back
Top