Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    Quote Originally Posted by moke123 View Post
    I believe we've discussed the tag property before.

    ...
    Yes, I know what the tag property is. I'm not sure how you use it to know if a field is required other than seting it somewhere for that specific purpose.
    Isn't there some way based on what is in the table property for required?
    Which has a corresponding question I'll make a new post for.

  2. #17
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,444
    Is there a simple way to see if data is required for a control? (I'm still foggy on how Access relates field types, length, required and format from a table into the text/combo boxes of forms).
    you can use a public function in a standard module. this air code allows you to pass any property name

    Code:
    Function prop(fld As DAO.Field, propName As String) As Variant
    'needs error protection if propName does not exist as a property, what that is depends on how you are going to use the function
        prop = fld.Properties(propName)
    
    
    End Function
    and called from your form with something like

    Code:
    if prop(Recordset(SupplierFK.ControlSource), "Required") then
       'do something
    end if

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 06-04-2018, 06:46 AM
  2. Replies: 4
    Last Post: 10-18-2014, 10:53 PM
  3. Replies: 6
    Last Post: 11-18-2013, 04:50 PM
  4. Form entry Control
    By Raury in forum Forms
    Replies: 1
    Last Post: 08-03-2011, 08:41 AM
  5. Replies: 4
    Last Post: 12-01-2010, 02:42 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