Solved

Passing string data from form to form.

Posted on 1997-06-17
6
136 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
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.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month3 days, 14 hours left to enroll

630 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