It is possible to refer in a SQL statement to the "current" or "actual" record?
I want to base the querry in the present value of two related tables. I will try to show you what I have to do, maybe you can give an alternative solution.
These are the tables:
tblTeam (idTeam, TeamName, DayCreated)
tblTeamPerson (idPerson, idTeam)
tblPerson (idPerson, PersonName, MusicPreference)
Every person have a music preference, and the teams have to be formed by people with similar music preference.
So, one way to filter that is to use the following method: everytime I create a team, I choose a person, ok. That firts guy is the one that will give the team his "MusicalPreference". The next members with different MusicalPreferences will be excluded from the query.
But in order to do that, I need to refer to the current team that have 1 member, and use the value of the field MusicPreference in that Person in particular.
I hope you have understand what I have to do, and I hope you can help me with this.
P.S.: I´m using a combo-box with a special query in a subform to select the team members. In the main form I create the team. So it would be great to be able to use that "idTeam" value in relation with the firts team member of that team.
I want to base the querry in the present value of two related tables. I will try to show you what I have to do, maybe you can give an alternative solution.
These are the tables:
tblTeam (idTeam, TeamName, DayCreated)
tblTeamPerson (idPerson, idTeam)
tblPerson (idPerson, PersonName, MusicPreference)
Every person have a music preference, and the teams have to be formed by people with similar music preference.
So, one way to filter that is to use the following method: everytime I create a team, I choose a person, ok. That firts guy is the one that will give the team his "MusicalPreference". The next members with different MusicalPreferences will be excluded from the query.
But in order to do that, I need to refer to the current team that have 1 member, and use the value of the field MusicPreference in that Person in particular.
I hope you have understand what I have to do, and I hope you can help me with this.
P.S.: I´m using a combo-box with a special query in a subform to select the team members. In the main form I create the team. So it would be great to be able to use that "idTeam" value in relation with the firts team member of that team.
Last edited: