continuous subform problem

mattwebb

New member
Local time
Today, 08:38
Joined
Jan 31, 2004
Messages
7
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.
 
hi, after spending a long time searching these forums and fiddling with my queries i have found a way of achieving my goal (albeit in a sloppy manner) through using conditional formatting and displaying the status fields through lookups in my record source queries.

Many thanks to anyone that took the time to read my additional post.

p.s. i would be interested to find out if there is a slightly 'cleaner' way of achieving this!
 

Users who are viewing this thread

Back
Top Bottom