i have a command button in access with the following event code:
[Search1] is the name of the buttonCode:Private Sub Search1_AfterUpdate() XX = [Search1] YY = "*" & [Search1] & "*" [Search1] = YY Forms![Frmsearch]![FrmSrch].Requery [Search1] = XX End Sub
just like that alone without any other code in the vba.
how are the XX and YY used without any declaration ?