I am an old FoxPro programmer (but have been out of programming for many years) and I have been through the Access basics that I have been able to find on line. So I can create tables, forms enter data the basics. I am learning VBA no problem there. Now I want to write some functions. I would like to write one function that is passed an ID and returns the last name of the person having that ID. I would like to write this function in two ways:
1. Connect to a table in my DB find the ID and return the name
2. Have the function perform a query that returns a record set from which the name is returned.
Does any one know where I can find some straight forward simple examples demonstrating this?
This is a training exercise for me to learn how to:
* Connect to tables and process data
* Create a record set and process data from the recordset
* Use debugging techniques breakpoints, run code from the immediate window etc.
I would really appreciate the help
Thanks