Results 1 to 2 of 2

Thread: Variable Field name in Recordsets

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Cheltenham
    Posts
    14

    Question Variable Field name in Recordsets

    Howdy.

    I'm trying to place a variable into the recordset column identifier.

    IE. rst![name].

    To use a variable (calculated) column name I have tried to use field joining characters and quotation marks, but to no avail.

    IE. rst![ " & name & "]

    Does anyone have any ideas of the correct syntax??

    Thanks for your help.

    Ciao

    Mattuis

  2. #2
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Now when you say place the var into the field name. Are you trying to change the fieldname. If so use the data schema object in ADO. If you mean place the value of a variable into a recordset why not just do the following
    rs.fields("MyField") = MyVar

Posting Permissions

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



Click Here to Expand Forum to Full Width