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
|
|||
|
|||
Visible Fields
I have 5 possible key players, with 5 corresponding fields. If field one is
selected I would like for the second to show up, but not visible until then. I have created a macro with the following code, but I get a mismatch error. [Forms]![frm_EnterData]![data_KeyPlayers_List1]=True Action = SetValue Item: [Forms]![frm_EnterData]![data_KeyPlayers_List2].[Visible] Expression: No Any Advice? Thanks |
#2
|
|||
|
|||
Visible Fields
It would be helpful to know what data type your fields are, but in general
you can do something like this in the Current Event of your form. [Forms]![frm_EnterData]![data_KeyPlayers_List2].[Visible] = [Forms]![frm_EnterData]![data_KeyPlayers_List1] = True -- Lynn Trapp Microsoft MVP (Access) www.ltcomputerdesigns.com "Smiley01" wrote in message ... I have 5 possible key players, with 5 corresponding fields. If field one is selected I would like for the second to show up, but not visible until then. I have created a macro with the following code, but I get a mismatch error. [Forms]![frm_EnterData]![data_KeyPlayers_List1]=True Action = SetValue Item: [Forms]![frm_EnterData]![data_KeyPlayers_List2].[Visible] Expression: No Any Advice? Thanks |
#3
|
|||
|
|||
Visible Fields
Smiley,
What is the Date Type of data_KeyPlayers_List1? Using a Condition of this =True would indicate this is a Yes/No data type. If you mean is there any data entered in there, maybe it should be like this... [data_KeyPlayers_List1] Is Not Null By the way, since this Condition relates to the a control on the same form as the macro is being run from, you don't need the [Forms]!... qualifier. -- Steve Schapel, Microsoft Access MVP Smiley01 wrote: I have 5 possible key players, with 5 corresponding fields. If field one is selected I would like for the second to show up, but not visible until then. I have created a macro with the following code, but I get a mismatch error. [Forms]![frm_EnterData]![data_KeyPlayers_List1]=True Action = SetValue Item: [Forms]![frm_EnterData]![data_KeyPlayers_List2].[Visible] Expression: No Any Advice? Thanks |
#4
|
|||
|
|||
Visible Fields
The data type is Text, its a drop down list of names.
"Lynn Trapp" wrote: It would be helpful to know what data type your fields are, but in general you can do something like this in the Current Event of your form. [Forms]![frm_EnterData]![data_KeyPlayers_List2].[Visible] = [Forms]![frm_EnterData]![data_KeyPlayers_List1] = True -- Lynn Trapp Microsoft MVP (Access) www.ltcomputerdesigns.com "Smiley01" wrote in message ... I have 5 possible key players, with 5 corresponding fields. If field one is selected I would like for the second to show up, but not visible until then. I have created a macro with the following code, but I get a mismatch error. [Forms]![frm_EnterData]![data_KeyPlayers_List1]=True Action = SetValue Item: [Forms]![frm_EnterData]![data_KeyPlayers_List2].[Visible] Expression: No Any Advice? Thanks |
#5
|
|||
|
|||
Visible Fields
In that case, change my suggestion to
[Forms]![frm_EnterData]![data_KeyPlayers_List2].[Visible] = Not IsNull([Forms]![frm_EnterData]![data_KeyPlayers_List1]) -- Lynn Trapp Microsoft MVP (Access) www.ltcomputerdesigns.com |
Thread Tools | |
Display Modes | |
|
|