Results 1 to 4 of 4
  1. #1
    mrcleanva is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    2

    Output Combo Box Selection to screen

    Hello everybody,



    This is the first time my class is using Microsoft Access and I am trying to output my combo-box selections to the screen after clicking on the "Enter" button. Can anybody help me out? I attached the Access file this post.

  2. #2
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    There are lots of ways to output values to the screen - Pop-ups? Textbox on the form? Something else?

  3. #3
    mrcleanva is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    2
    I was looking to output to a textbox when clicking the "Enter" button.

  4. #4
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    Create the textbox on your form, and then create code in the OnClick event of your button.

    You will need to get the values from your fields and combine them into a single output for the box. I assume there are a number of ways this can be done, but the simplest to understand would probably be to create a temp string variable to hold all the results, then collect the values from all the selections into the temp variable. Once you have all of them, set the textbox value equal to your temp variable.

    Code:
    Dim sTmp As String
    sTmp = Me.cboSize.Value
    sTmp = sTmp & vbCrLf & Me.cboBread.Value
    ...
    Me.txtOutput.Value = sTmp
    (vbCrLf is a Carriage Return/Line Feed)

    The object names I used do not match your sample (which used default names like "Combo14" making it a lot harder to reference them logically when writing code) but it should give you some ideas to get moving in the right direction.

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

Similar Threads

  1. Query from a Combo Box Selection?
    By bkvisler in forum Queries
    Replies: 3
    Last Post: 09-04-2010, 06:11 PM
  2. Pop-up Combo Box Record Selection
    By AKQTS in forum Forms
    Replies: 1
    Last Post: 08-11-2010, 01:01 PM
  3. Combo Box that doesn't allow selection
    By Ted C in forum Forms
    Replies: 20
    Last Post: 08-09-2010, 04:00 PM
  4. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  5. Replies: 3
    Last Post: 02-26-2009, 10:17 AM

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