I have a chunk of code that is calling a function insertIntoPlannerFile to do some updating as below
Call insertIntoPlannerFile("supplier 1 po", rowNumber, prForm.po1Edit)
Call insertIntoPlannerFile("supplier 1 po date", rowNumber, prForm.po1DateEdit)
Here prForm is the form name and po1Edit is the name of a textbox in that form. I have some other textbox also in the form such as po2Edit, po3Edit etc.
Since the above chunk of code is re using, I tried to make this also as a function. So I type the code as below
Function insertModule(objectNumber As String)
Call insertIntoPlannerFile("supplier " & objectNumber & " po", rowNumber, prForm.po & objectNumber & Edit)
Call insertIntoPlannerFile("supplier " & objectNumber & " po date", rowNumber, prForm.po & objectNumber & DateEdit)
End Function
And called the function as below
Call insertModule("1")
Call insertModule("2")
But somehow it is not working. Does anyone know how to change it into a re usable function?
EditrespDateEditinto quotes ("Edit"resp."DateEdit")