Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2014

    Unanswered: Conect Tables/Forms

    Hello all,
    Its been a while I was giving up on Access but I am at it again because its too handy so when you reply keep in mind I am an Access idiot lol.

    First. I have a zip code table and in my form I have City State and Zip. I want to enter the zip code and the zip code tell me the township or townships it belongs to. If there is only one I would like it to auto populate the city field.
    1 zip code could be part of more than one township. So I would enter 19526 and I would get something that says do you want Windsor or Hamburg. with out showing the entire list of options that are not part of that zip code. then click on the right one and populate the city field.

    Second in the database I have an entry form and have an update form. I don't know if I need it I might just need a search box for the OLN field to get the form to update it.. Ur advise would be appreciated.
    If the search to the form would be the way to go, how do I/we set that up and can the OLN be the main field to search.. Typing this out I think that might be the best way to go.

    Right know I also have a ID key cause access said I need one but the OLN is a unique number and I wonder could that be the ID Key?

    Third. I need to do a search that says anything with no received date to return all those records so I can update them or take further action.. Again some advise how to do this would be great. and from that list would create a table I guess so I could send a second letter and envelope.

    So I know this is a lot but I learned from trying to ask question in the past that one at a time was not the way to go because I get yelled about all the different things going on so trying to avoid that this time.. Please help

    I attached the database it has dummy info in it.. The Trooper Assigned list pulls from a master database that holds all employees in it so not sure it will work for you but works good for me.
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2014
    Provided Answers: 34
    A text box to enter the zip, txtZip
    the query for the combo box uses the txtZip as criteria:
    select City from tZipCodes where [ZipCode] = forms!frmEntry!txtZip

    in the AfterUpdate event of the text box, refresh the city combo box

    sub txtZip_Afterupdate
       if cbocity.listcount = 1 then cboCity = cbocity.ItemData(0)
    end sub

    2,3. search form produces a list, with a button to click 'edit' to open the Detail for editing.
    docmd.openform "frmDetail",,,"[id] = " & txtID

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts