Knowing the value of active record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cynicon
    New Member
    • Feb 2010
    • 20

    Knowing the value of active record

    Thank you guys for answering my last questions.


    Here is again a simple question with a simple answer I suppose...

    I need to know how to set in a Variable, the value of an especific column of the active record, so lets be more explicit; in column number 5 that is called "POLICY" of the active record, there is a value I neeed to know, in excel VBA i would do this:

    myvar = activecell.offs et(0,5).value

    What would be the code for an access table?
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    You can't do this in an Access table, and shouldn't! Data entry in Access should always be done thru a form based on the table, and the VBA code would be

    MyVar = Me.Policy.Value

    Since Value is the Default Property for a textbox, you can actually omit it and simply use

    MyVar = Me.Policy

    Welcome to Bytes!

    Linq ;0)>

    Comment

    • cynicon
      New Member
      • Feb 2010
      • 20

      #3
      Thank you so much Moderator, I really appreciate it, I will use it and reply again to let you know what happened, thanks again see ya

      Comment

      Working...