Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    Lebanon
    Posts
    44

    Unanswered: Refer to a field with a string

    Hi
    I'm trying to write a code in a form F and I need to refer to a field in the recordsource table with a variable.
    I have 2 fields in the table the first one is FirstName, the second one is LastName. A is a string, is there a way to use A to refer to the field name?
    I mean something like:
    A="FirstName"
    A.Value = "John"
    what should I add to this in able to make it work.
    Please forgive my ignorance, I'm a beginner and thank you for your help.
    Dani_30

  2. #2
    Join Date
    Apr 2004
    Posts
    17
    try looking at this it will help you alot now and in the futre, so you might want to Bookmark the page

    http://www.mvps.org/access/forms/frm0031.htm

    hope it works for you

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    forms!formName!fieldName.value

Posting Permissions

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