matrixindicator
IS-IT--Management
I use a button that run simple update queries that set a Yes/No field to yes or no. I want to use two queries that update the field to yes as all the fields are no and reverse if all the fields are yes update to no.
I wonder how I easily can know if all the fields are set to no or yes ? DCount is not doing the job (int not boolean)
I wonder how I easily can know if all the fields are set to no or yes ? DCount is not doing the job (int not boolean)
Code:
If (DCount("[PRICEMOD]", "TL_ART", "[refGROUP]='1'")) = False Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "QrySETTOYES"
DoCmd.SetWarnings True
Me.Refresh
Else
DoCmd.SetWarnings False
DoCmd.OpenQuery "QrySETTONO"
DoCmd.SetWarnings True
Me.Refresh