Dropdown Select Problem

B

Bob

On my Main Menu I have a dropdown list from a Combo Box (cbFinishHorse),
that shows me Horses that are in Finished Status. I am trying to write the
code for AfterUpdate. So as when I click the name of the horse his form
Record appears.
This is the Row Sourse:
SELECT tblHorseInfo.HorseID, funGetHorse(0,tblHorseInfo.HorseID,false) AS
Name, [StableReturnDate] FROM tblHorseInfo WHERE Status='Finished' ORDER BY
funGetHorse(0,tblHorseInfo.HorseID,true),
funGetHorse(0,tblHorseInfo.HorseID,false);


I did try this code, But its just returning a bnew blank form

Private Sub cbHorseFinished_AfterUpdate()
If CurrentProject.AllForms("frmHorseInfo").IsLoaded = True Then
DoCmd.Close acForm, "frmHorseInfo"
End If
If cbHorseFinished = "" Or IsNull(cbHorseFinished) Then Exit Sub
DoCmd.OpenForm "frmHorseInfo", acNormal, , , , , "FromMain"
End Sub
Thanks for your help......Bob
 
P

pietlinden

Bob said:
On my Main Menu I have a dropdown list from a Combo Box (cbFinishHorse),
that shows me Horses that are in Finished Status. I am trying to write the
code for AfterUpdate. So as when I click the name of the horse his form
Record appears.

I don't get it. Why not just use the combobox wizard for this? Just
pass the horse name/ID in the open event of the form you're opening?
Sounds like you may not have the wizards turned on.
 
B

Bob

I don't get it. Why not just use the combobox wizard for this? Just
pass the horse name/ID in the open event of the form you're opening?
Sounds like you may not have the wizards turned on.
Ok, I created a query for horses that are in finished mode and made my
dropdown combobox on my Main Menu, how do i go about creating the
AfterUpdate so it will select there record in frmHorseInfo....Thanx for your
help...Bob
 
Top