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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vba combo_AfterUpdate and Call combo_AfterUpdate not working...

Status
Not open for further replies.

arpeggione

Programmer
Nov 23, 2005
99
US
Hi: My code is as such:

me.cboTest.column(0).value = 1
me.cboTest_AfterUpdate


the "After_Update" line elicits an error message. I've also tried using "Call After_Update"....any ideas?

thank you!

Karen
 
Ok...I figured out how to activate the "After_Update" event - set the ListIndex - code below

me.cbo.sitead.requery
For mycIndex = 0 To Me.cboSiteAd.ListCount - 1
If Me.cboSiteAd.ItemData(mycIndex) = myADTitleID Then
Me.cboSiteAd.SetFocus
Me.cboSiteAd.ListIndex = mycIndex
Exit For
End If
Next

as an fyi - I extract the TitleID when I am adding a new record to the table:

rst.addnew
myADTitleID = rst("ADTitleID")

whew! glad to knock that one off...

karen
 
How are ya arpeggione . . .

What is it you intend/want to do? ... Assigning a value to the value property only selects an item in the combo ... [purple]if its in range![/purple] Also ... [blue]calling the same procedure[/blue] is the same as recursion!

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Aceman: thx for weighing in. My solution works very well. I just wanted to post for others to see....

please note - this part
rst.addnew
myADTitleID = rst("ADTitleID")

actually comes before the rest of the code.

thank you,
karen
 
arpeggione . . .

Gotcha ...

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top