Auto file text box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DeanO
    New Member
    • Feb 2007
    • 28

    Auto file text box

    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!txtIncident Number = Me1Incident.txt IncidentNumber
  • zimitry
    New Member
    • May 2007
    • 11

    #2
    Have you tried using DLookup?

    Comment

    • DeanO
      New Member
      • Feb 2007
      • 28

      #3
      Originally posted by zimitry
      Have you tried using DLookup?
      No but will try this and see what hajppens

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        I'm not sure exactly, but see if this (Example Filtering on a Form.) will help you.

        Comment

        • jamjar
          New Member
          • Apr 2007
          • 50

          #5
          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!txtIncident Number = Me1Incident.txt IncidentNumber
          I assume you mean
          "Me!txtIncident Number = Me!Incident.txt IncidentNumber" .
          Is "Me!Inciden t .txtIncidentNum ber" meant to refer to the textbox that has been filled out? If so, I think you will need to change it to
          Code:
          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 txtIncidentNumb er 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

          Comment

          Working...