A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need help with this please.



 
 
Thread Tools Display Modes
  #1  
Old January 15th, 2009, 10:09 PM posted to microsoft.public.access.gettingstarted
Bob H[_4_]
external usenet poster
 
Posts: 161
Default 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  
Old January 15th, 2009, 11:55 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default 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  
Old January 16th, 2009, 12:06 AM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old January 16th, 2009, 12:31 AM posted to microsoft.public.access.gettingstarted
David W. Fenton
external usenet poster
 
Posts: 3,373
Default 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  
Old January 16th, 2009, 03:27 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.