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
|
|||
|
|||
Conditional Formatting
Hi All,
here's the current problem: I have a form with a tab control which itself shows four instances of the same subform (with different recordsets). I've currently got the following expression for conditional formatting: [Forms]![frmMainBrowse]![frmMainComboBox]![frmData]![DT_PLANNED_START]" " This works great if you're only using the one tab, but if you move to another the conditional formatting still refers to the first tab. Is there any way to set the expression to only refer to the particular tab you're on? Only other way I can think is to duplicate the subforms.... Thanks as always, Marc |
#2
|
|||
|
|||
Conditional Formatting
What are you referencing? You seem to have referenced a combo box on the
main form, but then you have frmData and DT_PLANNED_START. Also, it looks as the formatting will occur if the data being checked is anything other than a single space. But maybe you posted it that way in an attempt to simplify the actual situation. I'm not sure what you mean by several different recordsets. I assume you mean several ways of sorting the same data, or some such thing. I don't see how one form could have multiple recordsets at the same time. You may be able to get what you want by setting the subform's recordset when you click a tab page. You can use code to identify the current tab page: Me.tabPageName.Pages(Me.tabPageName.Value).Caption The above should reference the caption property of the current tab page. This may be more than you need. You should be able to do something like this in the tab control's Change event: Select Case Me.tabPageName Case 0 Me.[SubformControlName].Form.Recordsource = "Query1" Case 1 Me.[SubformControlName].Form.Recordsource = "Query2" Case 2 Me.[SubformControlName].Form.Recordsource = "Query3" Case 3 Me.[SubformControlName].Form.Recordsource = "Query4" End Select Pages are numbered starting with 0. Maybe you could put the query name as the Tag property for the tab page, and set the record source thus (again, in the tab control's Change event): Me.RecordSource = Me.[SubformControlName].Pages(Me.SubfromControlName).Tag Marc T wrote: Hi All, here's the current problem: I have a form with a tab control which itself shows four instances of the same subform (with different recordsets). I've currently got the following expression for conditional formatting: [Forms]![frmMainBrowse]![frmMainComboBox]![frmData]![DT_PLANNED_START]" " This works great if you're only using the one tab, but if you move to another the conditional formatting still refers to the first tab. Is there any way to set the expression to only refer to the particular tab you're on? Only other way I can think is to duplicate the subforms.... Thanks as always, Marc -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200911/1 |
Thread Tools | |
Display Modes | |
|
|