Results 1 to 4 of 4

Thread: Database Information

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    Canton, GA
    Posts
    487

    Database Information

    Ok guys... I need your help here... let me give a little detail of what I have then hopefully some kind soul can help me...

    Under Microsoft Access I have a Database Call it MyDatabase.mdb

    in the database I have the following Tables with fields listed below each.

    Customers: (Table)
    Telephone(Primary Key)
    Name
    Address
    ZipCode

    ZipCodes: (Table)
    ZipCode (Primary Key)
    City
    State
    County
    Country

    I have a relation between the two tables tied to the "ZipCode" Field....

    Here is what I want to do:

    I want to have a form where somone is inputing information.. (I also need the same for the show information form)

    When someone inputs the "ZipCode" on the form I need it to look into the ZipCodes table for that zipCode and display the information assocaited with that data.

    Example:

    Joe Smith
    123 My Address
    30102

    Would trigger code to show the following:

    lblName: Joe Smith
    lblAddress:123 My Street
    LblCity:Acworth
    lblState:GA
    lvlZipCode:30102
    lblCounty:Cherokee

    Now I would like this to be dynamic so when the user inputs the information into the zipcode field the form updates and displays the fields that need no input after the zipcode is entered......so on and so forth....

    Now I hate to ask but I am a newbie and I am learning alot from all of you very helpful folks but PLEASE give me basic instructions.. (Comments are great) So I can learn...

    Thank you very much!!

    Anjari
    Last edited by Anjari; Dec 6th, 2002 at 07:20 PM.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Ok On the LostFocus event of the ZipCode textbox (that way it isn't searching before they are done typing) You'll need to open up a connection the the database. Then Query it for the zipcode info something like "SELECT * FROM ZipeCodes WHERE ZipCode=" & txtZipCode.Text (assuming the zip is not a string otherwise throw some quote in there as well). Then just populate the other textboxes if you find a match.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    Canton, GA
    Posts
    487

    Unhappy

    basic basic basic......

    Im lost with just 4 lines ;P, please give me MUCH more detail...

    Thanks Anjari

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Did you get this resolved or do you still want more details?

Posting Permissions

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



Click Here to Expand Forum to Full Width