Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Contents of one field show up in another

Status
Not open for further replies.

KingDufus

Technical User
Oct 9, 2001
19
0
0
US
I'm interested in having two fields that have different names, and I would like one of the fields to display the same exact information that is in the other field. So basically, I'd like the information to be entered in one of the fields, and have it automatically be displayed in another. Is this possible?

Thanks,
King Dufus
 

Are you referring to fileds on a form or in a table? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
on the after update event of the first field you would type this in the event procedure

Field2 = Field1

HTH
 
Thanks for posting! I am describing fields in a table. I am working with an existing Data Base, so I need the existing information in Field1 to automatically display in Field2 when either the table or a query is opened for viewing. I have little experience with Access. I looked at HTH's suggestion. The only update event I could find was in a form object. Does this suggestion mean that the information will only be passed along to the other field if you create a new entry? Will adding the suggested text affect existing data? Thanks! King Dufus
 

1) Why have two columns if both are to contain the same data?
2) Do you actually want to change the existing text? Do you want to change all values in field2 to the value in field1?
2) There is no method or option that I know of that will automatically change the contents field2 to the contents of field1 when opening a table. You can create a query that will show the same values but I again ask why? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Hi all, thanks for posting. Here are the reasons I was wanting to have two fields with different names, but the same content:

I'm creating an small Intranet site for a company. They have an exisiting database, that they want to access via a browser. I started to learn Perl to create the code to do this. I'm new to both Perl and Access, so I had a big task ahead. The Perl code didn't like the way some of the fields were named (They had special characters like #, and spaces in the names). I didn't want to alter the existing field names, so I wondered if there was a way to create a new field with an Perl-friendly name, which would have the same information as the old field. The code would then read the content of the new fields.
Since I don't know much about Perl or Access, I tried to think of all kinds of solutions that I thought might work.
In the end, I found a way in Perl to be able to read field names that have spaces and/or special characters in them, by enclosing the name in [].
Thanks again for posting!
-King Dufus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top