Results 1 to 2 of 2
  1. #1
    Remster is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    317

    Setting global variables

    Folks



    How do I set a global variable to a value in the current record? I have ...
    Code:
     
    Dim xyz As Integer
    ... at the top of my module and ...
    Code:
     
    Set xyz = Me!FieldName
    ... in the On Current event, but I get an 'object required' error with 'Set xyz =' highlighted. Any ideas?

    Thanks

    Remster

  2. #2
    Remster is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    317
    As is so often the case, I've discovered the answer shortly after posting. I've removed the word 'Set' and it works now.

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

Similar Threads

  1. Global Property Changes
    By ajetrumpet in forum Code Repository
    Replies: 2
    Last Post: 08-07-2012, 10:31 PM
  2. Replies: 4
    Last Post: 07-14-2011, 12:55 PM
  3. How to declare Global Variable
    By ganeshvenkatram in forum Access
    Replies: 1
    Last Post: 06-16-2011, 05:18 AM
  4. Help Please - Global Vars
    By graviz in forum Programming
    Replies: 3
    Last Post: 02-18-2010, 10:36 AM
  5. Macros for global search
    By joypanattil in forum Access
    Replies: 2
    Last Post: 11-28-2009, 04:30 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