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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can you use one text box to enter into two fields?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Does anyone know how to make one text box on a data entry form enter the value they type into it go into two different fields? Example would be I have a text box called Project Cost the user enter a dollar amount there. This dollar amount need to go into the column called Project Cost and into the column called Committed.

tig[puppy]
 
On the form, have the text box's Control Source reference to Project Cost (for this explanation, the name of this Text Box will be "Project Cost

Create another text box with the Control Source to Committed, but make the Visible = No. For this explanation, the name of this Text Box will be "Committed"

On AfterUpdate of "Project Cost", have Me!Committed = Me!ProjectCost

HTH Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

"No need to send gifts, just send a smile."
 
Its not the thing I would do ever ;-) - but it can be done, I guess that between the info and the amount there would be a space " " so we look for this space. On exit from me!txt1 put this code:
dim Rpl
Rpl =me!txt1
me!txt2=left(Rpl ,instr(1,Rpl ," ")-1)
me!txt3 = Right(Rpl, (Len(Rpl) - Len(me!txt2)) - 1)
If you have only 2 words in your txt1 field this will do the trick for U ;-)
Herman
 
Thank you BanditWk. That was exactly what I was looking for. I did it that way before but could not rember the me=me part of it.

Tig[puppy]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top