Results 1 to 7 of 7
  1. #1
    Anacronos is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    24

    How to biuld a form that changes depending on the user problem.

    Well I have a form that needs to be fill with twelve names each time but those names are divided into 3 groups and those groups are always changing
    So some days this maybe the out put.
    Group 1: name, name.
    Group 2: name.
    Group 3: name, name, name, name, name,name,name,name,name.

    Another maybe this
    Group 1:name,name,name,name,name,name,name,name,name,nam e,name,name.
    Group 2:
    Group 3:



    An so on.
    So in they might be in one field only or divided in the three of them.
    I wanted to make just three fields with long text on it. But I was wondering If is there another more-efficient way to do this? The reason for that is that 12 is always constant so I could VBa something to avoid it to be printed before is completely filled up(I´m not completely sure how xD), and the twelves fields would use always the same names (lots of paper are wasted cuz misspelling)
    Thanks In advance.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Not much to go on.... could you explain in more detail?


    Consider this:

    Have 12 text boxes and 12 combo boxes on a form.
    Enter a name into each of the 12 text boxes. All 12 text boxes must be filled in.
    The row source for each combo box would be "Group 1", "Group 2", "Group 3", so you could select one of the groups for each name.
    Each of the combo boxes must be filled in.

    Use code to check if 12 names have been entered and 12 groups have been selected.
    Then concatenate the names by group using code.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Just guessing on what you want the output to look like, but maybe 3 textboxes, each with their own source that you build by looping through a DAO recordset (where each gets the values for its own group), adding vbCrLf after each loop. You'd exit the loop if there are no records for a group. The textbox might have to be a memo field if you're going to exceed 255 characters. Also, for a textbox, you might have to use Chr(13) & Chr(10) [in that order] instead of vbCrLf.

    +I forgot to add these thoughts:
    Goal seems unorthodox; first, I doubt a textbox will present a scroll bar, so the idea doesn't fit what the control is made for. A listbox is for multi-line data that needs to have more than one row visible at a time and would be better than a text box. In addition, I wonder if a data sheet or subform data sheet would be better than either of the two control ideas.
    Last edited by Micron; 01-18-2016 at 09:35 AM. Reason: + added
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    Anacronos,

    As Steve said you haven't provided much context. Could you tell us in plain English a description of what you are trying to do in business terms? Perhaps an example would help clarify. There may be options if readers knew more.

  5. #5
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    perhaps you need to use the concatrelated function here

    http://allenbrowne.com/func-concat.html

  6. #6
    Anacronos is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    24
    The problem goes this way. The three groups are named Sensitivity:::: High, Sensitivity:::: Moderate, Sensitivity:::: Resistant. The twelve names are the names of antibiotics so for each bacteria the sensitivity is different varying from completely resistant to full sensible. So every time the form must be filled different.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    You need to have tables that store this information. Then filter the form or report dataset to display desired records.

    Sounds like you need a better understanding of relational database principles. Start with this tutorial site http://www.rogersaccesslibrary.com/
    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. Replies: 6
    Last Post: 11-26-2015, 01:54 AM
  2. Replies: 9
    Last Post: 08-25-2014, 05:09 PM
  3. Replies: 10
    Last Post: 10-22-2013, 07:35 AM
  4. Need different amounts of data depending on a user input?
    By parkerjallen in forum Database Design
    Replies: 2
    Last Post: 11-13-2012, 03:17 PM
  5. Replies: 4
    Last Post: 09-04-2012, 07:41 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