hello,
i am trying to diaplay a message in an unbound control on a continuous subform that indicates to the user if any related records exist to each continuous row.
In real terms what i am trying to do i display a list of swimming events in a subform with a box that says either "Selections Made" or "Selections Pending" depending if a related record exists to the row in the sub form i.e. if any selctions have been made.
At the moment i am trying to achieve this through using the DCount("*", "qryThatReturnsNoOfRelatedRows") in the subforms current event. This will display the message that i want, however it is the same for each record. What is happening is that when i click on a row it is updating the control to be the same for each row rather than individually for each row.
The code im using is...
Private Sub Form_Current()
If DCount("*", "qrysubfrmTeamSelection_CheckIfSelectionMade") > 0 Then
Me.SelectionStatus = "Selections Made"
Exit Sub
Else
Me.SelectionStatus = "Selections Pending"
End If
End Sub
where selectionStatus is the unbound control.
I would also like to alternate the back colour for the continuous form depending if a selection has been made or not.
Any help on this would be much appreciated.
Thanks in advance.
i am trying to diaplay a message in an unbound control on a continuous subform that indicates to the user if any related records exist to each continuous row.
In real terms what i am trying to do i display a list of swimming events in a subform with a box that says either "Selections Made" or "Selections Pending" depending if a related record exists to the row in the sub form i.e. if any selctions have been made.
At the moment i am trying to achieve this through using the DCount("*", "qryThatReturnsNoOfRelatedRows") in the subforms current event. This will display the message that i want, however it is the same for each record. What is happening is that when i click on a row it is updating the control to be the same for each row rather than individually for each row.
The code im using is...
Private Sub Form_Current()
If DCount("*", "qrysubfrmTeamSelection_CheckIfSelectionMade") > 0 Then
Me.SelectionStatus = "Selections Made"
Exit Sub
Else
Me.SelectionStatus = "Selections Pending"
End If
End Sub
where selectionStatus is the unbound control.
I would also like to alternate the back colour for the continuous form depending if a selection has been made or not.
Any help on this would be much appreciated.
Thanks in advance.