How can I autofil the City and State fields by entering a Zip?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #61
    OK.
    If I seem to be asking lots of questions without providing the answer, it's only because I don't know it yet.
    When you refer to the "bound field Cusip Number", is this a TextBox control, on the form, bound to a field in your recordsource, called [Cusip Number]?
    If so, what is the Control's name?
    The main missing ingredient that I was asking for (on which pretty well everything else is built) is the RecordSource of the form itself. Can you post that for me please?
    Please remember that it is critical for you to Copy/Paste the stuff in here. Retyping what you see is liable to suffer from the "Hands up all those who are absent" syndrome. Always Copy/Paste for something like this.

    Comment

    • Crayola465
      New Member
      • Feb 2007
      • 42

      #62
      Originally posted by NeoPa
      OK.
      If I seem to be asking lots of questions without providing the answer, it's only because I don't know it yet.
      When you refer to the "bound field Cusip Number", is this a TextBox control, on the form, bound to a field in your recordsource, called [Cusip Number]?
      If so, what is the Control's name?
      The main missing ingredient that I was asking for (on which pretty well everything else is built) is the RecordSource of the form itself. Can you post that for me please?
      Please remember that it is critical for you to Copy/Paste the stuff in here. Retyping what you see is liable to suffer from the "Hands up all those who are absent" syndrome. Always Copy/Paste for something like this.
      It is a combobox control that is bound to the ESCHEAT table and the Control's name is CUSIP NUMBER.
      The record source for the form is ESCHEAT
      Escheat is the table which all the information that is on my form goes.
      I tried not to get too fancy with names and I didn't name many of the fields becasue I am working with a database that was created before I started working here. Im just trying to make it a little more error-proof.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #63
        This normally refers to a query (or some SQL code) which is executed but something in the SQL has a value (in this case 'I') which it cannot recognise.
        I just had a thought :
        Check out all your controls and see if any one of them is attempting to bind to a field 'I'. It's a long shot, but all I can come up with I'm afraid.

        Comment

        • Crayola465
          New Member
          • Feb 2007
          • 42

          #64
          Originally posted by NeoPa
          This normally refers to a query (or some SQL code) which is executed but something in the SQL has a value (in this case 'I') which it cannot recognise.
          I just had a thought :
          Check out all your controls and see if any one of them is attempting to bind to a field 'I'. It's a long shot, but all I can come up with I'm afraid.
          I thought about that before and I checked it again but I have found nothing. I took the code out and ran through the form and had no error. It has to be somewhere in the code. Can you please look at it one more time? If you dont find anything, I guess I'll have to just give up.
          Code:
          Private Sub CUSIP_NUMBER_AfterUpdate()
              Me.[ASSET/TR-ACCT_NUMBER] = DLookup("[ASSET]", "[ASSET/CUSIP]", "[CUSIP] = '" & Me.[CUSIP_NUMBER] & "'")
          End Sub

          Comment

          • Crayola465
            New Member
            • Feb 2007
            • 42

            #65
            Originally posted by Crayola465
            I thought about that before and I checked it again but I have found nothing. I took the code out and ran through the form and had no error. It has to be somewhere in the code. Can you please look at it one more time? If you dont find anything, I guess I'll have to just give up.
            Code:
            Private Sub CUSIP_NUMBER_AfterUpdate()
                Me.[ASSET/TR-ACCT_NUMBER] = DLookup("[ASSET]", "[ASSET/CUSIP]", "[CUSIP] = '" & Me.[CUSIP_NUMBER] & "'")
            End Sub
            Nevermind...I guess I am just a space cadet. The problem was with the Asset/TR-Acct Number. It was supposed to be name not number. You have no idea how much of an idiot I feel like right now after all of this. Sorry for the confusion. It works just fine now. Thank you for all of you help everyone.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32633

              #66
              No problem Crayola.
              I'm glad you sorted your problem out mind you, as I looked again and still couldn't see anything :D

              Comment

              Working...