G
Guest
Hi All,
Within my db (access2003) I do use several times a button to open a form.
Lets say that on 1 form I have 4 buttons (banktypes, relationtypes and so on).
Now I do use within the procedure the command docmd.openform.
As i have declared the string stDocName I am able to reduce the procedure like
sub button1_clik()
stDocname = "form1"
call OpenRequestedForm
end sub
sub OpenRequestedForm()
docmd.openform stDocName
end sub
When I place the sub OpenRequestedForm within the same procedure everything
works fine. However placing it within a other procedure so other forms can
also make use of it does not work.
Within the other procedure I have tried to put in / leave out the
declaration of stDocName.
the debugger keeps telling me that it can not find a value for stDocname.
Any help would be very fine.
Greetings Harry
Within my db (access2003) I do use several times a button to open a form.
Lets say that on 1 form I have 4 buttons (banktypes, relationtypes and so on).
Now I do use within the procedure the command docmd.openform.
As i have declared the string stDocName I am able to reduce the procedure like
sub button1_clik()
stDocname = "form1"
call OpenRequestedForm
end sub
sub OpenRequestedForm()
docmd.openform stDocName
end sub
When I place the sub OpenRequestedForm within the same procedure everything
works fine. However placing it within a other procedure so other forms can
also make use of it does not work.
Within the other procedure I have tried to put in / leave out the
declaration of stDocName.
the debugger keeps telling me that it can not find a value for stDocname.
Any help would be very fine.
Greetings Harry