Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Passing string data from form to form.

Posted on 1997-06-17
6
Medium Priority
?
137 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 150 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

722 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