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

problem, error message

Status
Not open for further replies.

Greg553

MIS
Jul 6, 2009
60
US
I have no idea how this happened or how to fix it.
I have tried everything.

My combo boxes where working fine. I have two and based on what you choose in the first limits the second.
Cascading combos..
they were working fine than i got this message

This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.

I have looked at a saved version and it runs fine.
can anyone help me look in the right direction
 
hello agin, this is the code which works in the saved version and is excatly the same. I checked spelling everythign i can think of


Private Sub cbosport1_AfterUpdate()
Dim strSQL As String
strSQL = "SELECT sport_ID, Positions "
strSQL = " FROM qrysportspositions "
strSQL = " Where sport_ID = " & Me.Sport1
strSQL = " ORDER BY Positions"
Me!Position1.RowSourceType = "table/query"
Me!Position1.RowSource = strSQL
End Sub
 
Did you try compile the code? Is Sport_ID numeric?

You should save the form with a RowSourceType of Table/Query and then not have to use the one line of code each time.

Duane
Hook'D on Access
MS Access MVP
 
Thanks, for some odd reason the field was changed to text, have no idea how that happened, but got it fixed

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top