Normal Topic What simple thing am I missing with my use @Msgbox (Read 573 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
What simple thing am I missing with my use @Msgbox
Nov 21st, 2011 at 6:55pm
Print Post Print Post  
I know this should be really simple but I am having a problem and hopefully a fresh set of eyes will see the error I am overlooking.

I have  94 elements named stathistoryby ending in 05 to 94 example is stathistoryby10.

I had a test button that displayed the data from stathistoryby10 in a @msgbox that worked fine with this line below

@Msgbox("Status " + vAnswer + " History:","",stathistoryby10)

Now I wanted the user to select what status they wanted to see so I thought I would use @PromptForUserInput() to have them enter the number and then use that input to append stathistoryby with so it would show the data that is in the element.

The code below is what I used. I tried changing my variable to a string, I tried making another variable that created the stathistoryby with the number and then using the variable in my @Msgbox() I tried wrapping the command in () but no matter  what I do @Msgbox always displays my variable as  literal and not as the element name.

What am I overlooking?      

var  vAnswer as int
     vAnswer = @PromptForUserInput("What Status History would you like to see in more detail?", "")
     If vAnswer <> "" Then
     {
           
           @Msgbox("Status " + vAnswer + " History:","","stathistoryby" + VAnswer)

     }
     Else
     {
           @Msgbox("You didn't supply a Status Number to View.","","")
     }


  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: What simple thing am I missing with my use @Msgbox
Reply #1 - Nov 21st, 2011 at 6:58pm
Print Post Print Post  
var vAnswer as String

you got variable as int.

I think....
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: What simple thing am I missing with my use @Msgbox
Reply #2 - Nov 21st, 2011 at 7:19pm
Print Post Print Post  
Bharat_Naik wrote on Nov 21st, 2011 at 6:58pm:
var vAnswer as String

you got variable as int.

I think....


Bharat.

Thanks for loking at this but I have tried it both ways, it does not seem to have any effect (affect?) on the results.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What simple thing am I missing with my use @Msgbox
Reply #3 - Nov 21st, 2011 at 7:25pm
Print Post Print Post  
Is this more like what you want?

Code
Select All
var  vAnswer as string
	vAnswer = @PromptForUserInput("What Status History would you like to see in more detail?", "")
	If vAnswer <> "" Then
	{

		@Msgbox("Status " + vAnswer + " History:","", @("stathistoryby" + VAnswer))

	}
	Else
	{
		@Msgbox("You didn't supply a Status Number to View.","","")
	}
 


  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: What simple thing am I missing with my use @Msgbox
Reply #4 - Nov 21st, 2011 at 7:49pm
Print Post Print Post  
Thank you SIR!

you got it perfect. I tried every combo of wrapping that but not the @ outside the parentheses.

Thanks, once again for the guidance and help. 

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: What simple thing am I missing with my use @Msgbox
Reply #5 - Nov 21st, 2011 at 8:05pm
Print Post Print Post  
You are very welcome.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged