Results 1 to 3 of 3
  1. #1
    Weetbix is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    1

    [HELP]: How to show extra fields in a form if a value is selected

    Hi all, new here. Just signed up to get some help on a particular aspect of Access. I'm quite a beginner to access but I'm starting to require using it for work. I'm using Access 2003 (with Windows XP).

    I'm intending to make two extra fields open up if a particular value is selected. Just as a simple example:
    Field: Type of Item
    Possible Values: Alcohol, Beverage, Cutlery

    So if either a beverage or alcohol is selected, I would like a new field to open up. For both Alcohol and Beverage, I would like "Content of bottle in mLs" to open up. For Alcohol, I would also like "Percentage Alcohol content" to also open up.



    So basically, if a specific value is selected, I would like extra fields to come up. I'm not sure if there's any simple way to do it, or whether it requires VBA coding, but either way if it is possible I would like it to be done.

    I also have a few other side questions, but I think it might be more appropriate for me to post them as a separate thread:
    1) How do you make an input mask enter from right to left? For example, if post codes can either be 4 or 5 digits long, I put 90000 (requiring at LEAST 4 digits) but if you start entering data, it starts from the 9. Would it work if I did 00009?
    2) Is there any way to make a form go through a progression of screens rather than all the input fields being on the one page?

    Thanks in advance!

    edit: Just realised that this post may have been more appropriate in the "Forms" sub forum? Not sure.. sorry.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    * toggling the visibility true/false of one control based upon the value of another control is quite common, it does require rudimentary VBA and you must choose an event in which to put it (typically in the AfterUpdate event of the control holding the value. the typical code is:
    me.ControlName.visible=false

    * masks are tricky, I avoid them where ever possible and I really don't know if one can reverse the direction on that. not sure I've ever seen that question before...

    * the form progression you are looking for are called Tabbed Forms. not able to explain this topic in a forum - invest in an Access textbook easily findable at amazon or a large book store and all these topics are covered.

    hope it helps.

  3. #3
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481

    Spend some time examing the properties of forms and controls.

    Much of what you want to do can be accomplished by manipulating the "Visible" property of controls. You will also need to understand how to reference variables, controls, fields... Googling these topics will quickly move you along. Qualify your search by putting Access as the first word.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. show text box if tick box is selected
    By zac123 in forum Access
    Replies: 16
    Last Post: 09-06-2015, 12:14 PM
  2. Form to' export selected fields
    By Fabdav in forum Forms
    Replies: 3
    Last Post: 10-08-2011, 11:28 AM
  3. Show selected records in subform
    By Papilion in forum Forms
    Replies: 8
    Last Post: 06-18-2011, 07:41 AM
  4. Replies: 0
    Last Post: 03-08-2011, 05:56 PM
  5. Replies: 1
    Last Post: 08-17-2010, 02:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums