6 Replies - 1069 Views - Last Post: 14 March 2009 - 03:18 AM Rate Topic: -----

#1 S3lkies  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 248
  • Joined: 09-January 09

Accessing the Data in a Textbox

Post icon  Posted 13 March 2009 - 12:38 AM

okay well I have 3 text boxes and one command button

TXT_INPUT
TXT_NUMBER
TXT_OUTPUT
CMD_WORKOUT



well i want to be able to put in what ever i want in the "input" how many times i want it in the "number" and when i press "workout" it puts whatever i put in the "input" the amount of times i put in "number" in the "output" box .

... i originaly thought it would be

TXT_OUTPUT=TXT_INPUT*TXT_NUMBER


but chyehh im getting an "run time error 3 type missmatch"
and i suppose i shouldnt have thought it would be that easy lol ..

so chyehh can anybody help like im guessing ill need to loop it and set variable and stuff ??

thanks alot in advance ^_^

This post has been edited by S3lkies: 13 March 2009 - 12:40 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Accessing the Data in a Textbox

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2253
  • View blog
  • Posts: 9,439
  • Joined: 29-May 08

Re: Accessing the Data in a Textbox

Posted 13 March 2009 - 04:36 AM

Secret: What you type in the number textbox isn't a number.
Was This Post Helpful? 0
  • +
  • -

#3 S3lkies  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 248
  • Joined: 09-January 09

Re: Accessing the Data in a Textbox

Posted 14 March 2009 - 01:33 AM

View PostAdamSpeight2008, on 13 Mar, 2009 - 03:36 AM, said:

Secret: What you type in the number textbox isn't a number.


i know but their isnt such thing as a numberbox ... is their? S=

but chyehh it the only thing i can put it in unless i could do input boxes ... but still i have no idea about how to do that ... that might be a better option though ... anyhelp with the input boxes? ... thanks
Was This Post Helpful? 0
  • +
  • -

#4 sastre06  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 81
  • Joined: 05-June 07

Re: Accessing the Data in a Textbox

Posted 14 March 2009 - 01:55 AM

The string in the textbox must be converted to integer first before you do a mathematical operation

like this
the string is converted to integer or number

val(string)

TXT_OUTPUT=val(TXT_INPUT)*val(TXT_NUMBER)

:^: :^:
Was This Post Helpful? 0
  • +
  • -

#5 S3lkies  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 248
  • Joined: 09-January 09

Re: Accessing the Data in a Textbox

Posted 14 March 2009 - 02:08 AM

View Postsastre06, on 14 Mar, 2009 - 12:55 AM, said:

The string in the textbox must be converted to integer first before you do a mathematical operation

like this
the string is converted to integer or number

val(string)

TXT_OUTPUT=val(TXT_INPUT)*val(TXT_NUMBER)

:^: :^:


thanks but it didnt work now when i click the cmd button nothing happens ... i think itl be best to stick with the input box idea
Was This Post Helpful? 0
  • +
  • -

#6 sastre06  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 81
  • Joined: 05-June 07

Re: Accessing the Data in a Textbox

Posted 14 March 2009 - 02:40 AM

View PostS3lkies, on 14 Mar, 2009 - 01:08 AM, said:

View Postsastre06, on 14 Mar, 2009 - 12:55 AM, said:

The string in the textbox must be converted to integer first before you do a mathematical operation

like this
the string is converted to integer or number

val(string)

TXT_OUTPUT=val(TXT_INPUT)*val(TXT_NUMBER)

:^: :^:


thanks but it didnt work now when i click the cmd button nothing happens ... i think itl be best to stick with the input box idea



I'm using vb6, and it work..
Was This Post Helpful? 0
  • +
  • -

#7 S3lkies  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 248
  • Joined: 09-January 09

Re: Accessing the Data in a Textbox

Posted 14 March 2009 - 03:18 AM

is that all you have actually put in the cmd button? and does it actually make what you put in input come out the amount of times you put in number in the output box?

have you put any other info into it? all i have put is your code into the cmd button and that's all ?

thanks in advance

This post has been edited by S3lkies: 14 March 2009 - 03:18 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1