• Populating Table (2000)

    Author
    Topic
    #393906

    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

    Viewing 1 reply thread
    Author
    Replies
    • #717962

      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

    • #717963

      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

    Viewing 1 reply thread
    Reply To: Populating Table (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: