Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a Public Variable
Message
 
To
07/05/2003 18:26:30
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00786043
Message ID:
00786047
Views:
23
Check your Read Events


>Hi all:
>
>In my mani form I have a varaiable as being public in scope. This variable gets release only when the user exists the application.
>
>This is a snippet of the main form's code:
>
>
PUBLIC mWhoIsTheUser, mUserLogKey, mWhenWasFormAccessed, mWhichFormWasAccessed,;
>mTillWhen, mUserReferenceNumber
>
>mUserReferenceNumber = ""
>mWhoIsTheUser = ""
>mUserLogKey = 0
>
>etc....
>
>* I now select the required info including the reference number.
>select * from login into cursor templogin nofilter ;
>	  where login.user == upper(alltrim(mprogramuser))
>
>		mUserLastName = templogin.last_name
>		mUserFirstName = templogin.first_name
>		mLoginDate = date()
>		mLoginTime = time()
>		mUserReferenceNumber = templogin.reference
>
>                etc..
>
>I then call use the mUserReferenceNumber in another form.
>
>
SELECT ALLTRIM(PROPER(Last_name))+", "+ALLTRIM(PROPER(first_name)) as UserFullName, ;
>	reference from Login INTO CURSOR NameOfTheUser nofilter;
>	WHERE (Login.reference) = (mUserReferenceNumber)
>			
>mMessengerName = NameOfTheUser.UserFullName
>
>SELECT * from Messages INTO CURSOR ViewMessages nofilter;
>	WHERE ALLTRIM(PROPER(Messages.Recipient)) == ALLTRIM(PROPER(mMessengerName))
>
>mMessageDate = ViewMessages.DateSent
>mSender = ViewMessages.Sender
>
>This works fine when I am in the development mode. i.e., set the initial values of the variables from the command window and then run the 2nd form. IOW, the value of mSender is displayed in the txtSender control. However, the same, when compiled does not seem to show up in the text control.
>
>Where am I going wrong? Thanks in advance.
Mathias Banda

Time is longer than a rope.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform