Results 1 to 6 of 6
  1. #1
    DarthZ is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    17

    Form option groups and display styles

    Hello all,



    I am an extremely new access user who has been learning on the job for the past few weeks. I have several issues that I had questions about:

    1. I have been making option groups using the instructions from this website http://www.fontstuff.com/casebook/casebook05.htm and was wondering if there was another quicker way of doing it.

    2. Is it possible to have on the form a fill in section that is shaped in three different text boxes but link to one field. For example (not using this for date but just example) Date:___/_____/_____ . is there anyway to make it look like that (with the blank spaces and / separations or with three text boxes[] [] []).

    3. And last but not least, is it possible to have a form that initially asks a question (in my case, what type of surgery) and then based on that answer have the form display the fields related to the answer.

    I am new to access so if you can provide links to websites or other sources that can help out will be really helpful. Any help will be greatly appreciated. Thank You.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    1. That is how option groups are built. If you want an alternate control, try combobox or listbox.

    2. Yes and No. You can have 3 textboxes arranged to appear as one but cannot be bound to same field. Would need VBA code to save the data. For the date example, can use input mask property of a single textbox to show that structure. I use: 99/99/"20"00;0;

    3. Yes. Again, need VBA code to produce this behavior.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    DarthZ is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    17
    Thank you for the response and tips June7. However, I am very new at access and am wondering now what VBA code would be needed? Is there a guide anywhere that would help me set these objects up? Thanks again for your help

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Review this article as a starter http://office.microsoft.com/en-us/ac...010341717.aspx

    Items 2 and 3 would require code in an event (button Click, control AfterUpdate, form Close).

    For 2, probably in form Close and date field is part of the form RecordSource, concatenate the 3 date parts into one value and set the field equal to that, like:
    If Int(Me.textbox1) And Int(Me.textbox2) And Int(Me.textbox3) Then
    Me!fieldname = Me.textbox1 & "/" & Me.textbox2 & "/" & Me.textbox3
    End If
    Also, the slash separations would not be in the textboxes but labels between the textboxes.

    For 3, several ways to approach this. Review the article and try some coding before tackling this.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    DarthZ is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    17
    Thanks for the advice. I read over the article and have had practice over the last few weeks coding in option groups and putting in calendars (for older access). What would be the coding for 3, which is to have one question field dictate which field catagories are shown in the form

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    One way is to have unbound combobox where user enters criteria then the form RecordSource has criteria parameter that refers to the combobox for input and code filters the form recordset to display record(s) that meet criteria. Review this tutorial http://datapigtechnologies.com/flash...tomfilter.html

    My example code in previous post has wrong approach. The Int functions will simply error if input is not a number. Try this instead:
    If Not IsNull(Me.textbox1) And Not IsNull(Me.textbox2) And Not IsNull(Me.textbox3) Then
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Question about Option Groups
    By mnsemple83 in forum Forms
    Replies: 3
    Last Post: 07-18-2011, 11:25 AM
  2. Enabling Option Groups using Macros
    By mnsemple83 in forum Forms
    Replies: 1
    Last Post: 07-15-2011, 06:11 PM
  3. Option Groups and Adding Data to Tables
    By ipitydafool in forum Forms
    Replies: 5
    Last Post: 05-02-2011, 01:59 PM
  4. Working with Radio Buttons and Option Groups
    By queenbee in forum Access
    Replies: 1
    Last Post: 04-29-2011, 02:25 PM
  5. Option Groups - change value from number to text
    By nchesebro in forum Programming
    Replies: 10
    Last Post: 02-09-2011, 03:52 PM

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