Compiling problems

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

Guest

After I compile my database, events will not run the cose i have made. Does
anyone know whay this happens? ex.
Private Sub County_Enter()
On Error Resume Next
County.RowSource = "Select Counties.County " & _
"FROM Counties " & _
"WHERE Counties.State = '" & State.Value & "' " & _
"ORDER BY Counties.County;"
End Sub

I made these combo boxes to narrow the the list of counties based on the
value of the "State" combo box. This wortks fine until i create the accde and
then it will not work. Please help.
Thanks
 
Scott said:
After I compile my database, events will not run the cose i have made.
Does
anyone know whay this happens? ex.
Private Sub County_Enter()
On Error Resume Next
County.RowSource = "Select Counties.County " & _
"FROM Counties " & _
"WHERE Counties.State = '" & State.Value & "' " & _
"ORDER BY Counties.County;"
End Sub

I made these combo boxes to narrow the the list of counties based on the
value of the "State" combo box. This wortks fine until i create the accde
and
then it will not work. Please help.
Thanks

I would put this code into the AfterUpdate event of the State combo box
instead.

Carl Rapson
 
Carl,
I originally had it that way, but then it was possible to change the state,
and still have a previous county for a different state listed. In the
afterupdate of the State field i have:
me.County.value = ""

this way it will reset the field value. have any other ideas?
 
You can still put that code in the AfterUpdate event of the State field,
after you clear the County field. As to why the code wouldn't be resetting
your RowSource, I can't see any obvious reason. You said that it was working
until you created the .accde (I assume you mean .ade?); does that mean you
could open the form and the code populated the combo box correctly? And it
stopped working only after you compiled it?

Sorry I can't be of more help, but I have never worked with Access projects.
Perhaps someone with more experience can jump in here.

Carl Rapson
 
Yes, you are correct, the code all works fine unitl it is compiled, at which
code and even the simple expressions will not work. I hope someone can help
out with this, as I do NOT want to pay 245 for support, as Microsoft see this
as an advanced issue.
 
Back
Top