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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Addition to Query 10
Change Row Source to Query! 10
Double Click List Box! 2
Addition to a Query! 1
Help with Query! 25
Adding a new column to ListBox! 7
Add Extra Column to List Box 0
Add to AfterUpdate 3

Top