In a subform, there are varying number of records for CustID:
CustID ContactName Address etc.
------- ---------------- --------- ------
1 a
1 b
2 h
3 k
3 l
3 m
4 n
I want to apply alternating shade to the entire row from one CustID to the next. This way, the user can easily locate the information because the subform has many columns and fills the screen lengthwise.
Question1: How can I do this? Is there a built-in feature in the property sheet I can apply the required setting?
I supose, we can have fnRecordShade([CustID]) returing True or false when CustID changes if no other easier solution. If question 1 not possible then how should this function to look like:
Function fnRecordShade(lngCustID) as boolean
' the body of function to return true or false
' when CustID canges
fnRecordShade = True/False
End function
Thank you.
I think the best solution is to use a second subform for the contacts. When you click on a customer in subformA to set focus to it, subformB will show the contacts for that company.
You can do this with the master/child links but you need to include the subform name in the reference. So the Master link would be sfrmA.CustID and the Child would be CustID.