Results 1 to 2 of 2
  1. #1
    jwill is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Location
    MD
    Posts
    67

    Default Value using a public variable...why isn't this working

    I'm trying to set the defaultvalue property using a variable. When I check the variable in the immediate window it gives me the correct value. The data type of the variable is a string, so I'm not sure why this isn't working. I'm getting #name? in the text box. Any ideas?



    Code:
    Me.entering_assoc_ID_txt.DefaultValue = var_assoc_id

  2. #2
    jwill is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Location
    MD
    Posts
    67

    Unhappy

    Never mind I figured it out its:

    Code:
    Me.entering_assoc_ID_txt.DefaultValue = "'" & var_assoc_id & "'"
    ....whatever Microsoft, lol

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

Similar Threads

  1. How to use global/public variable
    By mrbabji in forum Programming
    Replies: 7
    Last Post: 05-18-2013, 10:08 PM
  2. Setting Variable Default for Combo Box
    By gazaway in forum Forms
    Replies: 5
    Last Post: 04-08-2013, 10:32 AM
  3. Replies: 1
    Last Post: 03-28-2013, 07:54 AM
  4. Replies: 2
    Last Post: 08-05-2011, 04:41 PM
  5. public instead of dim not working
    By DKY in forum Access
    Replies: 1
    Last Post: 10-14-2008, 11:42 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