Results 1 to 2 of 2
  1. #1
    ksmith119 is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    1

    Using vba to link fields to trigger visible icon

    I am trying to make an icon visible dependant on a field on another form being completed. I am able to get this to work with the following code
    If Not IsNull(Book_Title) Then


    Forms![frm_Author]![subfrm_AuthorProject]![Command22].Visible = True

    BUT
    this makes the icon visible for all projects the author has (which are shown in the (continuous) subform) .
    The link field is projectID so how to I specify that in the above code

    Essentially I want to say

    If ProjectID=ProjectID then
    If Not IsNull(Book_Title) Then
    Forms![frm_Author]![subfrm_AuthorProject]![Command22].Visible = True

    but of course this doesnt work

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    It can't be done they way you are attempting because a single command to a continuous form type affects all controls of the same name....which repeat in each record....

    You must update the underlying record source (table) of the continuous form - perhaps a checkbox or some value in a new field....and then requery the continuous form - and the continuous form needs to be modified for conditional formatting of the command22 that toggles its visibility based on the new checkbox/value field within its row....

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

Similar Threads

  1. Update fields using a field trigger
    By G4Stech in forum Import/Export Data
    Replies: 3
    Last Post: 10-23-2014, 02:18 PM
  2. multiple conditionally visible fields
    By KWarzala in forum Modules
    Replies: 2
    Last Post: 04-02-2014, 10:33 AM
  3. Replies: 2
    Last Post: 01-06-2011, 04:38 AM
  4. Report showing non-visible fields
    By AKQTS in forum Forms
    Replies: 2
    Last Post: 09-21-2010, 09:40 AM
  5. Setting fields visible/invisible
    By col5473 in forum Forms
    Replies: 1
    Last Post: 09-17-2010, 09:14 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