Solved

Passing string data from form to form.

Posted on 1997-06-17
6
135 Views
Last Modified: 2010-04-04
How can I pass data in a string variable across forms without the new form nulling the variable?
0
Comment
Question by:the2x4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 4

Expert Comment

by:erajoj
ID: 1337114
Huh?
Please explain further.

/// John

0
 
LVL 4

Accepted Solution

by:
StevenB earned 50 total points
ID: 1337115
 I think what John was getting at was that you havn't provided enough information for a good answer to be provided. From what you've written it seems as though there should be no problem. Passing a string variable from one unit/form to another can be done simply by referencing the other unit in the assign statement and making sure the unit is in the uses clause:

{In Form1}

var
  AString : String;

{In Form2}

Uses
  Form1;

......

var
  AnotherString : String;
begin
  AnotherString := 'Some piece of information vital to Form1';
  Form1.AString := AnotherString;
end;

  This seems to be what your asking, but if I've completely missed the point then you'll have to explain the problem more fully, perhaps with some code.

  Steven.
0
 

Author Comment

by:the2x4
ID: 1337116
I recently bought Delphi 3 with no experience at all in that
language. I knew the learning curve would be steep but 3 was
reccomended for its fast app developement. It indeed is quicker
for me. I resolved the problem another way still the original
question explains the results I obtained. I am sure the reference
Steven explained is the solution. Delphi 3 would be a snap if I
had been thru 1 & 2. Thank you Stephen for assuming I needed
BASIC :-) assistance. Thanks for the help.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:StevenB
ID: 1337117
 You should have no difficulty in learning into Delphi 3 without having used 1 or 2. Glad to have helped.

  Steven.
0
 
LVL 4

Expert Comment

by:StevenB
ID: 1337118
 You should have no difficulty in learning Delphi 3 without having used 1 or 2. Glad to have helped.

  Steven.
0
 
LVL 4

Expert Comment

by:StevenB
ID: 1337119
 I hate it when that happens.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question