Hey all..I just wanted to say thanx again for the help I received last time...here again with a wacky one.
I am working in Acesss XP ...
I have a form with several command buttons to open different forms. I would like to know If I could create a module somewhere along the lines of
but use a global term like "cmdname" and make them strings
dim cmdname as string
dim camdbutton composition as string
I don't know the best way to do it or to ecen try to explain it..
basicaly I want a global name so that when I click on the button it reads the buttons name and opens the matching form...
I would like to be able to assign the SAME CODE to the several different buttons on one form to open the matching form.
There are 27 different buttons and I dont wanna have to make 27 different macros to do the same action...
I am working in Acesss XP ...
I have a form with several command buttons to open different forms. I would like to know If I could create a module somewhere along the lines of
Code:
IF "camdbuttonname = "composition" then
docmd.openform "compositon",,,,,acwindownormal
but use a global term like "cmdname" and make them strings
dim cmdname as string
dim camdbutton composition as string
I don't know the best way to do it or to ecen try to explain it..
basicaly I want a global name so that when I click on the button it reads the buttons name and opens the matching form...
I would like to be able to assign the SAME CODE to the several different buttons on one form to open the matching form.
There are 27 different buttons and I dont wanna have to make 27 different macros to do the same action...