Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unhappy Unanswered: Field Variable (From Newb)

    I'm trying to use a variable to reference a field in a recordset to update data programatically.

    Example:

    1) Give a string variable the target fields name:
    eg strVar = "[Name Field]"

    2) Update the data in the field using the variable to access the field

    set rs = db.open....

    do while not rs.EOF
    rs.edit
    rs(strVar) = ![Firstname Field]

    I know this is a noobie request but you help will be much appreciated.

    Thanks in advance

  2. #2
    Join Date
    Jan 2003
    Location
    Rockville, MD
    Posts
    179
    Hi porangi,

    Skip the brackets.
    eg strVar = "Name Field"

    JT

  3. #3
    Join Date
    Oct 2003
    Posts
    2
    Originally posted by JTRockville
    Hi porangi,

    Skip the brackets.
    eg strVar = "Name Field"

    JT
    Thanks JT that works great.

Posting Permissions

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