Results 1 to 3 of 3
  1. #1
    Richie27 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Ireland
    Posts
    159

    Dynamically set the row source of a combobox???

    Hi all,

    I have a combobox filter on a mainform.

    I have a combobox filter on a subform - the values of which are derived from a hard coded query.

    Is it possible to change the row source of the subform combo based on what is clicked on in the mainform combobox filter? I also want to be able to clear the combo's rowsource completely - when add new record is clicked.





    Mucho, mucho Gratias



    Rich.

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    You can dynamically change the rowsource of a combobox using vb.
    [control_name].rowsource= "String here for full sql statement"

    To clear it use
    [control_name]=null

  3. #3
    Richie27 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Ireland
    Posts
    159
    Oh my word, you are a life saver!

    You were helping me with this before - my communication must have been poor!!

    Thanks a million!

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

Similar Threads

  1. overriding combobox row source
    By mitchmcc in forum Access
    Replies: 7
    Last Post: 01-07-2012, 05:13 AM
  2. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  3. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  4. Replies: 0
    Last Post: 12-16-2009, 01:14 PM
  5. ComboBox Row Source Value
    By mpbertha in forum Forms
    Replies: 1
    Last Post: 08-21-2009, 06:34 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