Hi there,
Extreme newbie here so hopefully this is an easy one.
I have a switchboard with three buttons. Each button will open the same form BUT I need to pass a string depending on which button is pressed. In other words, Button A, Button B, and Button C on the switchboard. Press Button A and 'A' gets passed to Form1. Press Button B and 'B' gets passed to Form1. Press Button C and 'C' gets passed to Form1.
I realize I can use radio buttons to do this too - is that easier or better than using buttons? I like buttons because they make it very obvious to the user what the need to do.
Now here is where it gets tricky. On Form1 there is a field with an integer. I'm not sure yet whether this field will be an autonumber or will be manually entered by the user.
This number and the string passed by the button from the switchboard will be concatenated and stored in the table that supplies the fields for Form1. So if the user presses Button C and then on Form1 the number is 3 the value that is actually stored in the table is 'C3'.
So here is what I'm thinking I have to do, though I don't know the code that goes into it.
1) use OpenArgs to pass the string ('A', 'B', or 'C') from each button on the switchboard. Store the string in a variable somewhere that Form1 can access.
2) In the AfterUpdate() property of the textbox on Form1 that holds the integer concatenate the integer with the string variable and insert it into the table.
Is this about right? Please feel free to offer suggestions, alternatives, and most important, the how where and what of coding this idea.
thanks!
melissa
Extreme newbie here so hopefully this is an easy one.
I have a switchboard with three buttons. Each button will open the same form BUT I need to pass a string depending on which button is pressed. In other words, Button A, Button B, and Button C on the switchboard. Press Button A and 'A' gets passed to Form1. Press Button B and 'B' gets passed to Form1. Press Button C and 'C' gets passed to Form1.
I realize I can use radio buttons to do this too - is that easier or better than using buttons? I like buttons because they make it very obvious to the user what the need to do.
Now here is where it gets tricky. On Form1 there is a field with an integer. I'm not sure yet whether this field will be an autonumber or will be manually entered by the user.
This number and the string passed by the button from the switchboard will be concatenated and stored in the table that supplies the fields for Form1. So if the user presses Button C and then on Form1 the number is 3 the value that is actually stored in the table is 'C3'.
So here is what I'm thinking I have to do, though I don't know the code that goes into it.
1) use OpenArgs to pass the string ('A', 'B', or 'C') from each button on the switchboard. Store the string in a variable somewhere that Form1 can access.
2) In the AfterUpdate() property of the textbox on Form1 that holds the integer concatenate the integer with the string variable and insert it into the table.
Is this about right? Please feel free to offer suggestions, alternatives, and most important, the how where and what of coding this idea.
thanks!
melissa
Comment