Hi
I created a tempvar using a macro
and then opened a form.
I noticed the button to convert macros to vba so I duplicated my form and tried it
the code created was
Code:
'------------------------------------------------------------
' btn_Search_Click
'
'------------------------------------------------------------
Private Sub btn_Search_Click()
TempVars.Add "varYear", txtYearOfBaptism
DoCmd.Close acForm, "frm_BaptismYearSearch"
DoCmd.OpenForm "frm_BaptismYearSearchResults", acNormal, "", "", , acNormal
End Sub
but it gives the error
runtime32438
TempVars can only storedata. They cannot Store objects
My Macro works perfectly
Can anyone tell me what the error is?
thanks
Ian