First of all thanks for your answers.........
Second: I want to pass this parm FROM THE SWITCHBOAD!!!!!
The solution i have found (and for my prodject work correct) is....
1)I have add a new column in the switchboard table Name ArgumentParm type string (is the place where i put my parms with the same way as you said) something like 10|90 etc etc
And in my Switchboard screen i have add the line
Const conCmdOpenFormBrowse_Parm = 33 after the
Const conCmdOpenFormBrowse = 3
and the
Case conCmdOpenFormBrowse_Parm
DoCmd.OpenForm rs![Argument], , , , , , rs![ArgumentParm] after the
Case conCmdOpenFormBrowse
DoCmd.OpenForm rs![Argument]
so my Private Function HandleButtonClick(intBtn As Integer) is like this
Private Function HandleButtonClick(intBtn As Integer)
' This function is called when a button is clicked.
' intBtn indicates which button was clicked.
' Constants for the commands that can be executed.
Const conCmdGotoSwitchboard = 1
Const conCmdOpenFormAdd = 2
Const conCmdOpenFormBrowse = 3
Const conCmdOpenFormBrowse_Parm = 33
Const conCmdOpenReport = 4
Const conCmdCustomizeSwitchboard = 5
Const conCmdExitApplication = 6
Const conCmdRunMacro = 7
Const conCmdRunCode = 8
Const conCmdOpenPage = 9
.
.
.
.
.
.
Select Case rs![Command]
' Go to another switchboard.
Case conCmdGotoSwitchboard
Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" & rs![Argument]
' Open a form in Add mode.
Case conCmdOpenFormAdd
DoCmd.OpenForm rs![Argument], , , , acAdd
' Open a form.
Case conCmdOpenFormBrowse
DoCmd.OpenForm rs![Argument]
' Open a form with parms.
Case conCmdOpenFormBrowse_Parm
DoCmd.OpenForm rs![Argument], , , , , , rs![ArgumentParm]
After this all is the same.........
Now if i want just to open a form without parms i use the number 3 in the switchboard
If i wand to pass parm i use the number 33 and in the ArgumentParm column i add my parameters
I hope to help someone else how has the same problem with me.......
