I am trying to use a function module to get a data count of a certain field (Idhull) in a specific query after updating a combo box on any one of several forms. (continuous and single)
I have tried several things to no avail. The code below is stripped of other statements to get rid of non essentials. I get a syntax error message whenever activating.
With Screen.ActiveForm
MsgBox DCount("[idHull]", "[Q_Jib_PriceCalc]", "idhull=.idhull")
End with
I also sent the idhull value the module ( called it "ih") and tried this:
DCount("[idHull]", "[Q_Jib_PriceCalc]", """ idhull=& ih & """)
This doesn't give an error message, but gives the maximum count of the whole query matter what idhull it receives.
I am using A2007 with W7
Any help much much appreciated. Would also appreciate knowing where to find basic instructions on how to do this.