Results 1 to 2 of 2
  1. #1
    stubbly is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    2

    Referring to objects

    Hi,

    I'm trying to write a proceedure in VBA that will change a property of a control that was passed from the calling proceedure.

    So


    ...
    ChangeProperty (Cust_Name)
    ChangeProperty (Cust_Address)
    ...


    Private Sub ChangeProperty (ChangeField)
    ...
    If IsNull(ChangeField)
    ChangeField.SpecialEffect = 0
    Else
    ChangeField.SpecialEffect = 2
    End if
    ....
    End Sub

    Problem is it's refering to the value not the actual passed field ref. How can I change it so the properties of the desired field is changed?

    Many thanks

  2. #2
    stubbly is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    2
    Got the answer. Drop the (). So it's:

    ...
    ChangeProperty Cust_Name
    ChangeProperty Cust_Address
    ...

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

Similar Threads

  1. query objects in VB6
    By genesis in forum Access
    Replies: 1
    Last Post: 07-10-2009, 02:16 AM
  2. Simple Question about Referring to tables
    By KIDRoach in forum Access
    Replies: 4
    Last Post: 06-19-2009, 07:34 AM
  3. All Access Objects shows nothing
    By Viwadd in forum Access
    Replies: 5
    Last Post: 05-29-2009, 02:23 PM
  4. IMPORT-ALL-OBJECTS is missing Tool
    By pacala_ba in forum Import/Export Data
    Replies: 0
    Last Post: 03-25-2009, 10:13 AM
  5. Referring to fields in tab controls
    By AndrewAfresh in forum Forms
    Replies: 1
    Last Post: 06-03-2006, 05:10 PM

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