Results 1 to 6 of 6
  1. #1
    new2access123 is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    6

    Writing Access functions


    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

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Litwin & Getz's Access (2002 or2000) Developers Handbook, Desktop Edition is an excellent hornbook.

  3. #3
    new2access123 is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    6
    Thank you. I will find it.

  4. #4
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    You can find it used on amazon.com for about $10. Be sure to get the "Desktop Edition" (first, you'll want the other volumes too).

  5. #5
    new2access123 is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    6
    Thanks. I'll get the books there.

  6. #6
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    There are VBA, Desktop and Enterprise volumes. All are useful. I found the Desktop volume most useful, so will you. The Enterprise volume is good for multi-user apps and Access security. You might find the books as a set; CD for each volume (canned code) may be available.

    The 2002 edition is marginally better than the 2000 edition.

    I have a set for home and one for the office. the solutions they contain apply to all versions. A2K upward has more functionality.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Automatically Writing SQL From A Table
    By smitstev in forum Programming
    Replies: 1
    Last Post: 06-05-2009, 09:38 AM
  2. Help writing multiple queries
    By wz72n01 in forum Queries
    Replies: 1
    Last Post: 05-24-2009, 12:30 PM
  3. I need help writing a query statement
    By dking in forum Queries
    Replies: 1
    Last Post: 02-25-2009, 09:43 AM
  4. Multiple IIF functions possible?
    By Northgate in forum Access
    Replies: 0
    Last Post: 10-08-2008, 01:11 PM
  5. Force writing from the right in a field?
    By Looping in forum Forms
    Replies: 0
    Last Post: 01-23-2006, 03:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums