Wednesday, March 21, 2012

passing a value into a global variable....

i have a global variable in which i want to pass a value taken from a field in a database.

Dim Number1 as Integer
Dim RAnswer as Integer

Sub Start_Click

'other coding goes here..............

Number1 = objDataReader("QNo")
RAnswer = objDataReader("QAns")

End sub

i need the value taken from QNo, and passed into the global variable Number1 so that i can use the value inside Number1 in another subroutine. can anyone tell me how to do this...
ThanxIs there anything wrong you are encountering? You might try casting the result of the reader to an Integer.

Number1 = CInt( objDataReader("QNo") )

0 comments:

Post a Comment