looks like It will work putting it into On Load - but how do you translate formula with quotes into vba
I want
Code:
Me.RevAttain1.Controlsource = "DLookUp("[RevBonus]","[Tbl2_MgrBonus]","[BonusMo]=" & [TxtMo1] & "And [BonusYr]=" & [TxtYear] & "And [MgrID]=" & [TxtMgrID])"
It hits the first quote and thinks it is the end of the expression. If I triple up the quotes it does not work
Code:
Me.RevAttain1.Controlsource ="DLookUp("""[RevBonus]""","""[Tbl2_MgrBonus]""","""[BonusMo]=""" & [TxtMo1] & """And [BonusYr]=""" & [TxtYear] & """And [MgrID]=""" & [TxtMgrID])"