Connecting Tech Pros Worldwide Forums | Help | Site Map

Auto file text box

Newbie
 
Join Date: Feb 2007
Posts: 28
#1: May 26 '07
I want info from one form text box to auto fill another form text box when the second box gets the focus.
I tried an Expression did not work and I tried this code
"Me!txtIncidentNumber = Me1Incident.txtIncidentNumber

Newbie
 
Join Date: May 2007
Location: North East Wales
Posts: 11
#2: May 26 '07

re: Auto file text box


Have you tried using DLookup?
Newbie
 
Join Date: Feb 2007
Posts: 28
#3: May 26 '07

re: Auto file text box


Quote:

Originally Posted by zimitry

Have you tried using DLookup?

No but will try this and see what hajppens
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,730
#4: May 27 '07

re: Auto file text box


I'm not sure exactly, but see if this (Example Filtering on a Form.) will help you.
jamjar's Avatar
Member
 
Join Date: Apr 2007
Location: Sydney, Australia
Posts: 50
#5: May 28 '07

re: Auto file text box


Quote:

Originally Posted by DeanO

I want info from one form text box to auto fill another form text box when the second box gets the focus.
I tried an Expression did not work and I tried this code
"Me!txtIncidentNumber = Me1Incident.txtIncidentNumber

I assume you mean
"Me!txtIncidentNumber = Me!Incident.txtIncidentNumber".
Is "Me!Incident .txtIncidentNumber" meant to refer to the textbox that has been filled out? If so, I think you will need to change it to
Expand|Select|Wrap|Line Numbers
  1. Forms("Incident")!txtIncidentNumber
as "Me" can only refer to the form from which you are running the code. Both forms would have to be open.
The other option would be if the textboxes txtIncidentNumber on both forms are bound to the same field, you could make sure you save the record on the first form and use Me.Requery on the second form when it is activated to refresh the values.

James
Reply