Solved Filter cascading comboboxes between subforms (1 Viewer)

Manos39

Registered User.
Local time
Today, 11:57
Joined
Feb 14, 2011
Messages
248
Hello, i would appreciate help on my problem
Having 2 subforms linked child/parent i am facing problem to have my athletes in second subform chosen by their gender selected in first subform

ist subform is bound to Tbl_Races, second to Tbl_Times

subforms are linked with textbox on main form txtRace(=[Frmsub_Race].[Form]![raceID] / to 2nd Subform raceID

Trying to accomplish on selected gender in first subform then in second subform and in athletesID to show for input only men or women (see pict 3 with selected male race, both men and women are shown for input :mad:)
Have tried a bunch of techniques but no joy..
 

Attachments

  • Screenshot 1.jpg
    Screenshot 1.jpg
    41.2 KB · Views: 83
  • Screenshot 2.jpg
    Screenshot 2.jpg
    79.8 KB · Views: 85
  • Screenshot 3.jpg
    Screenshot 3.jpg
    87.8 KB · Views: 82
  • SwimmerDatabase.accdb
    3.3 MB · Views: 99

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,237
i made qryTimes (which include genderID) and use it as Recordsource of subform frmsub_Time.
i also add code to the subform frmSub_Race's Current event to change the recordsource fo frmSub_Time
to only Gender on the frmSub_Race.
i added code to the GotFocus event of athleteID combobox of frmSub_Time to only show Athletes with
same gender as in frmSub_Race.
 

Attachments

  • SwimmerDatabase.accdb
    3.3 MB · Views: 106

Manos39

Registered User.
Local time
Today, 11:57
Joined
Feb 14, 2011
Messages
248
i made qryTimes (which include genderID) and use it as Recordsource of subform frmsub_Time.
i also add code to the subform frmSub_Race's Current event to change the recordsource fo frmSub_Time
to only Gender on the frmSub_Race.
i added code to the GotFocus event of athleteID combobox of frmSub_Time to only show Athletes with
same gender as in frmSub_Race.
I appreciate help but something happens when inserted, records dont reappear next time db opens..
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,237
dont reappear next time db opens.
where are you adding record to the Time subform?
the name are not coming out because your last record has male and female mixed
on the same time subform.
 

Manos39

Registered User.
Local time
Today, 11:57
Joined
Feb 14, 2011
Messages
248
where are you adding record to the Time subform?
the name are not coming out because your last record has male and female mixed
on the same time subform.
I shall erase records and try again and i let you know
 

Manos39

Registered User.
Local time
Today, 11:57
Joined
Feb 14, 2011
Messages
248
I have had erased records both in tbl_times and Tbl_Races and when using correted (your form with subforms), same problem in fact there is a problem with coding in afterupdate of Frmsub_Race (attached pictures), and again when close and reopen Main form, records made using Frmsub_Time dont reappear in second subform (frmsub_Time)
See attached db, in different raceID with records applied, records for females typed, dont reappear when reopen
 

Attachments

  • Screenshot 1.jpg
    Screenshot 1.jpg
    77.5 KB · Views: 79
  • Screenshot 2.jpg
    Screenshot 2.jpg
    93.1 KB · Views: 85
  • SwimmerDatabase (records dont reappear).accdb
    3.3 MB · Views: 100

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,237
you Delete the AfterUpdate and AfterInsert from your code.
that was Originally there (you added that?), i only added Current event to your frmSub_Race.
 

Manos39

Registered User.
Local time
Today, 11:57
Joined
Feb 14, 2011
Messages
248
Please try yourself in your example. It s been weeks since i try accomplish what i want. In your attachment with no deletions
do you see not that when reopen db does not hold records? It making me crazy. This is your upload reopened and untouched..
 

Attachments

  • Screenshot 4.jpg
    Screenshot 4.jpg
    79.9 KB · Views: 89
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,237
try this modification.
 

Attachments

  • SwimmerDatabase.accdb
    816 KB · Views: 95

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:57
Joined
May 7, 2009
Messages
19,237
see the Gotfocus and Lostfocus event of the the athleteID of Frmsub_Time.
 

Users who are viewing this thread

Top Bottom