Results 1 to 6 of 6
  1. #1
    cotri is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Jan 2010
    Posts
    32

    Appending to a Combo Box


    In a form for taking orders I use a “combo Box” for the Zip Code Field and this will populate the City and State using a “select Query” and a Zip Code table. I use this to save time taking orders and it also matches the correct city to the Zip Code that matches UPS software records to prevent hang-ups with their software and address correction charges. Many of the orders taken use this form for inputting but some come from another access database and linking tables and then appending my original table. When the table is appended the Zip Code is appended but I do not append the City or State because I want to take those from my Zip Code table. The problem is the Zip Code is appended but I do not get the City or State look-up. There is a “Tab Stop” for this Zip Code field so I will be tabbing through this field. There are also fields in the imported records that wont be in the records that are created in this form so if it would help one of these fields could be checked for Null to show where the record is coming from. Anybody have any ideals here. Thanks

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Not quite sure what you need here. Care to state the issue in another way?

  3. #3
    cotri is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Jan 2010
    Posts
    32
    Quote Originally Posted by RuralGuy View Post
    Not quite sure what you need here. Care to state the issue in another way?

    For about 7 years I have been using a Access database for taking mail orders. I have the form set up so when I input the Zip Code it automatically fills in the City and State from a table. Now I am also taking orders from Ebay sales. I import data from ebay and link the tables with no problems. There is no City or State field in my main table because it looks it up in the table from the Zip Code. When I link the tables I use only the Zip Code and that works fine but it does not look-up the City or State. If in the form I delete the Zip Code and re-enter it then it will look-up the City and State. Another problem that may be related is I have a couple of fields that are set up with “default” values and they are not being updated. All of these problems are only with the imported records. I hope that makes more since. Thanks for any help

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I think I understand. When you look at the imported records with your form, the "automatic" fields are not being completed. It sounds like the "automatic" fields are being completed in the AfterUpdate event of each control. Try adding similar code in the CurrentEvent of the form. That should complete existing records as well.

  5. #5
    cotri is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Jan 2010
    Posts
    32
    Quote Originally Posted by RuralGuy View Post
    I think I understand. When you look at the imported records with your form, the "automatic" fields are not being completed. It sounds like the "automatic" fields are being completed in the AfterUpdate event of each control. Try adding similar code in the CurrentEvent of the form. That should complete existing records as well.
    Thanks for the help here. This is starting to make since but I cannot find CurrentEvent. I see BeforeUpdate and AfterUpdate in the priorperties for these fields but no CurrentEvent. I see the code for AfterUpdate. I looked in the ”Control Source” of these fields but again don’t see CurrentEvent. As far as the fields that have a Default values, that default was set in the properties under “Default Value” and there was nothing under AfterUpdate. For these I found I could just set the default value in the table so they are not too much of a problem. Will I find CurrentEvent in Access 2000? Why do these updates not take place as I tab through the fields with updates? Thanks

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Only a form has a Current event, not a control on the form.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Appending a table with external script
    By farva in forum Import/Export Data
    Replies: 0
    Last Post: 11-09-2009, 12:12 PM
  2. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  3. Replies: 3
    Last Post: 02-26-2009, 10:17 AM
  4. Appending Records to tables with relationships
    By RubberStamp in forum Import/Export Data
    Replies: 0
    Last Post: 12-14-2008, 06:52 AM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums