Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

MS Access Programming Forms

  • 04-10-2008 10:35pm
    #1
    Closed Accounts Posts: 5,096 ✭✭✭


    Hi,

    I know that this is simple but I can't crack it, it's late on Saturday and this is due on Sunday!

    I do some programming in VBA with Excel but a client has asked me to do a database. Most of it is pretty simple but I am stuck in one area. the client wants the contents of the drop downs to change in the forms depending on what is slected in other drop downs.

    Now for most of the forms this is fine - I can alter the table source for teh drop downs on prior control change using VBA.

    But there is one table coming in from an outside datasource. I need to pick up columns from this table in a form and -for example - if the client selects a last name I want to show all the first names that may match that last name. My plan was to feed the drop down from a query that was parameterised on the 1st drop down. Nut I can't find the right VBA code to make it work.

    I know it's simple but does anyone have a simple answer?

    Thanks!


Comments

  • Registered Users Posts: 2,598 ✭✭✭Saint_Mel


    You could try something like putting code like Combo2.Requery into the AfterUpdate event of the 1st combo. And for the data source of the second one have something like SELECT FirstName from NamesTable WHERE LastName Like Combo1.text


  • Closed Accounts Posts: 5,096 ✭✭✭--amadeus--


    That's brilliant - took a bit of battering but I now have it working!

    Thanks a million


Advertisement