Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Now-Luanda, Angola, Originally - Anna Bay, New South Wales, Australia
    Posts
    238
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Populating Table (2000)

    Yes I know its dumb but I have a really basic function I have never worked out how to do ie populate a table based on selecting an item from a drop down and filling in another 1 (or more) fields based on that selection in the drop down. Let me explain better with 2 examples:
    I want to be able to choose Anna Bay from a list of towns on a form and have Access automatically put its postcode in the appropriate field in the table and of course, form
    Similarly I want to be able to choose a ticket code, have the form show (and save in the Table) the tour associated with that code, fill in the price automatically based on the code chosen (cause I have a separate table of tour codes, tour names and tour prices) and then calculate the total cost by multiplying the number of passengers (filled in on the form) by the price chosen above and automatically put it in the Tickets sold table in a field called total cost - PS I need to be able to change the prices in future and not have it affect historical sales saved in the tickets sold table
    Apologies in advance for asking something that I'm sure everyone else learnt in Acess 101 remedial
    Dummy from Down Under <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  2. #2
    4 Star Lounger
    Join Date
    Dec 2002
    Location
    Kitchener, Ontario, Canada
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populating Table (2000)

    You ought to be able to adapt/reverse engineer this database I used for convention registration. Open the receipts form. Choose someone from the list and the address info is filled in. Go to the subform and choose an item and the fee, etc is also filled in automatically.

    In addition, there is a not in list event in the names field so you can type in the last name of a new person, hit enter and you will get a dialogue that asks if you want to add them to the list. If you say yes, It will pop up the client form. Enter the rest of the info, hit OK and you can go back to doing the receipt.

    Depending on what references you have set in VBA, there may be missing references for the not in list event (I can't remember which ones are needed for this database.) Post back if the not in list event isn't functioning properly.

    Peter N
    Attached Files Attached Files

Posting Permissions

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