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
|
|||
|
|||
Need help with this please.
I have a table with 11 different types of tools , and I want a form with
a combo box or similar to select the tool type from another table. Then when that specific tool type is shown, I just want the required feilds for that tool to show, and hide the other feilds which are not relevant. The table has 12 feilds for 11 differnt types of tools and not all feilds are required for all tools, so some feilds are Null. Is there a way to do what I want please? Thanks |
#2
|
|||
|
|||
Need help with this please.
Put code in the combo box's AfterUpdate event to handle it.
Private Sub cboTool_AfterUpdate Select Case Me.cboTool Case "Tool1" Me.Control1.Visible = False Me.Control2.Visible = True Me.Control3.Visible = False Me.Control4.Visible = True Case "Tool2", "Tool3" Me.Control1.Visible = True Me.Control2.Visible = True Me.Control3.Visible = False Me.Control4.Visible = True Case "Tool4" Me.Control1.Visible = False Me.Control2.Visible = True Me.Control3.Visible = True Me.Control4.Visible = True ' etc. End Select End Sub -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Bob H" wrote in message ... I have a table with 11 different types of tools , and I want a form with a combo box or similar to select the tool type from another table. Then when that specific tool type is shown, I just want the required feilds for that tool to show, and hide the other feilds which are not relevant. The table has 12 feilds for 11 differnt types of tools and not all feilds are required for all tools, so some feilds are Null. Is there a way to do what I want please? Thanks |
#3
|
|||
|
|||
Need help with this please.
Already responded to in a separate newsgroup.
Please don't post the same or closely related items separately to separate newsgroups. Not only does that make you have to remember and look in all the places you posted, but the volunteers in these newsgroups end up duplicating each other's efforts. If there is a strong need to post to more than one newsgroup (this is rare), please use the To:/Newsgroups: field to add the 'groups. This way, a response in one shows up in the other(s). Regards Jeff Boyce Microsoft Office/Access MVP "Bob H" wrote in message ... I have a table with 11 different types of tools , and I want a form with a combo box or similar to select the tool type from another table. Then when that specific tool type is shown, I just want the required feilds for that tool to show, and hide the other feilds which are not relevant. The table has 12 feilds for 11 differnt types of tools and not all feilds are required for all tools, so some feilds are Null. Is there a way to do what I want please? Thanks |
#4
|
|||
|
|||
Need help with this please.
"Douglas J. Steele" wrote in
: Put code in the combo box's AfterUpdate event to handle it. Private Sub cboTool_AfterUpdate Select Case Me.cboTool Case "Tool1" Me.Control1.Visible = False Me.Control2.Visible = True Me.Control3.Visible = False Me.Control4.Visible = True Case "Tool2", "Tool3" Me.Control1.Visible = True Me.Control2.Visible = True Me.Control3.Visible = False Me.Control4.Visible = True Case "Tool4" Me.Control1.Visible = False Me.Control2.Visible = True Me.Control3.Visible = True Me.Control4.Visible = True ' etc. End Select End Sub I suspect you just made that up, as it's not at all logical, since Control2 and Control4 are always visible under all cases. I think it's better if sample code not have inconsistencies like that, as someone could easily get hung up trying to understand why you're setting something to the exact same value no matter what choice is made. -- David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/ |
#5
|
|||
|
|||
Need help with this please.
"David W. Fenton" wrote in message
36.98... "Douglas J. Steele" wrote in : I suspect you just made that up, as it's not at all logical, since Control2 and Control4 are always visible under all cases. I think it's better if sample code not have inconsistencies like that, as someone could easily get hung up trying to understand why you're setting something to the exact same value no matter what choice is made. Of course I just made it up, since the OP gave no details. And the 'etc was intended to indicate that additional cases would be there (the OP did say 11 different tools, and I only showed 4) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) |
Thread Tools | |
Display Modes | |
|
|