Results 1 to 5 of 5
  1. #1
    eww is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    125

    Nz() for properties instead of values

    I understand how the Nz() function is for if you have a blank field and you want to set the value in that field, but I'm looking for a similar function that affects properties. Or can this function work for properties. Basically I want to say, If this control is null, do not have it enabled, if it is not null, leave it enabled. Would I use an IIF() function here? Here's my best guess (though I know it's not right).

    Private Sub Form_Current()
    Me.txtResubmittalDate.Value = IIf(IsNull(Me.txtResubmittalDate), Enabled = 0, Enabled = -1)


    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    How about:

    Me.txtResubmittalDate.Enabled = Not IsNull(Me.txtResubmittalDate)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    yes, you can use isnull for property
    But I don't think the above eww's code would work.

  4. #4
    eww is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    125
    Paul that works, thank you.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. How to store inventory properties?
    By tuna in forum Database Design
    Replies: 1
    Last Post: 08-05-2010, 01:02 AM
  2. Replies: 5
    Last Post: 01-29-2010, 11:09 AM
  3. Setting Field Properties for Numbers
    By Tim Hardison in forum Access
    Replies: 1
    Last Post: 12-09-2009, 06:47 AM
  4. Displaying Query Properties in a Form
    By Bjar in forum Programming
    Replies: 1
    Last Post: 07-16-2008, 07:51 AM
  5. Setting combo box properties
    By rathfam4 in forum Programming
    Replies: 1
    Last Post: 12-28-2005, 02:27 AM

Tags for this Thread

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