[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

Passing string data from form to form.

How can I pass data in a string variable across forms without the new form nulling the variable?
0
the2x4
Asked:
the2x4
  • 4
1 Solution
 
erajojCommented:
Huh?
Please explain further.

/// John

0
 
StevenBCommented:
 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
 
the2x4Author Commented:
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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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

  Steven.
0
 
StevenBCommented:
 You should have no difficulty in learning Delphi 3 without having used 1 or 2. Glad to have helped.

  Steven.
0
 
StevenBCommented:
 I hate it when that happens.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now