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

Weird cascading combo behaviour on continuous subform

Status
Not open for further replies.

Kennelbloke

Technical User
May 22, 2015
32
AU
Hi Folks

Got a form(sub) with a weird problem. Bit hard to explain but the attached video says it all.

I have tried the subform in datasheet mode with the same affect. The cascading combos are working fine just not displaying properly.

When the PetType is selected sets PetTypeID to that combo. On update the following is called and run

Sub SetComboSource()
Dim strSQL As String
strSQL = "SELECT tblBreeds.BreedID, tblBreeds.Breed FROM tblBreeds WHERE tblBreeds.PetTypeID = " & Me.PetTypeID & " ORDER BY tblBreeds.Breed"
Me.BreedID.RowSource = strSQL
End Sub


BreedID Combo then displays Breed names based upon the PetTypeID.

This is also called on Form_Current()

Anyone have any ideas about this behaviour?
 
 https://files.engineering.com/getfile.aspx?folder=f471f94f-9da3-4864-8a91-c4389fd06f2b&file=Access_2021-03-20_16-50-21_(1).mp4
I didn't look at your video but suggest you google "ms access cascading combo boxes in continuous form". You should be able to find a solution.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
So from the video I'm taking it that the subform combo is only displaying one breed instead of the full list of breeds that you expect to be displayed? Is the BreedId combo bound to any data field?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top