If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I 'repaint' a subfom?
Main form (Form1) subform on Form1 (Form2).
List boxes in both forms , tables are linked. Form 2 list box has a QUERY to filter records depending on which record is selected in Form1 list box. How do I repaint the Form2 (subform) listbox as I move from record to record in Form1 listbox. I can do this as 2 separate forms by running a Macro which closes/opens Form2 every time I click on a record in Form1 listbox. The relationship between Form1 and Form2 tables is one to many. |
#2
|
|||
|
|||
How do I 'repaint' a subfom?
Using the Current event of the main form and the AfterUpdate event of the
listbox on the mainform you need to requery the listbox on the subform. The requery code should look something like this: me.sfrmForm2.form.MyList.requery replace 'sfrmForm2' above with the name of the subform control on the main form. This is not necessarily the same as the name of the form object that is referenced in the ControlSource of the subform control. To be sure, open the main form and click once on the subform then check the name property under the Other tab. Whatever you find there is what belongs in place of sfrmForm2. If the main form's listbox is bound to a field in the main form's rowsource then putting the code in the main form's current event will ensure that the subform's listbox is requeried each time record navigation occurs. -- Sandra Daigle [Microsoft Access MVP] Please post all replies to the newsgroup. simcon wrote: Main form (Form1) subform on Form1 (Form2). List boxes in both forms , tables are linked. Form 2 list box has a QUERY to filter records depending on which record is selected in Form1 list box. How do I repaint the Form2 (subform) listbox as I move from record to record in Form1 listbox. I can do this as 2 separate forms by running a Macro which closes/opens Form2 every time I click on a record in Form1 listbox. The relationship between Form1 and Form2 tables is one to many. |
#3
|
|||
|
|||
How do I 'repaint' a subfom?
thank you very much for your help. I have only spent last 3 days trying to
get this to work! "simcon" wrote: Main form (Form1) subform on Form1 (Form2). List boxes in both forms , tables are linked. Form 2 list box has a QUERY to filter records depending on which record is selected in Form1 list box. How do I repaint the Form2 (subform) listbox as I move from record to record in Form1 listbox. I can do this as 2 separate forms by running a Macro which closes/opens Form2 every time I click on a record in Form1 listbox. The relationship between Form1 and Form2 tables is one to many. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Toolbar repaint issue ... | Joe | Using Forms | 0 | January 30th, 2006 08:59 AM |
Repaint ? | an | Using Forms | 2 | September 27th, 2005 06:54 PM |
Repaint a form with a TreeView Object | Mauricio Silva | Using Forms | 0 | January 25th, 2005 06:55 PM |
Repaint a form | Warrio | Using Forms | 2 | September 14th, 2004 02:22 PM |