I have a stored procedure that works fine on it's own, now I need to call it in the before update event of a control on my form and save the output in a database field. I've searched MS knowlege and this site for an answer first, but cannot seem to find it. I may not be asking the correct question, but any help would be greatly appreciated, thank you.
the stored proceedure simply gets the users login name and I want to store that in a field in the customer table that the the form being used is attached to. I want to place a call to the sp in the before update event of a control, presumably using docmd.openstoredprocedure, and save the resulting user name in another field. I tried the following, which does not work:
me.CallListUser = docmd.OpentoredProcedure "sp_GetUserName"
the stored proceedure simply gets the users login name and I want to store that in a field in the customer table that the the form being used is attached to. I want to place a call to the sp in the before update event of a control, presumably using docmd.openstoredprocedure, and save the resulting user name in another field. I tried the following, which does not work:
me.CallListUser = docmd.OpentoredProcedure "sp_GetUserName"