Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:47:29+00:00 2026-06-10T05:47:29+00:00

In ASP.NET I have the option for building a CheckBoxList control from a data

  • 0

In ASP.NET I have the option for building a CheckBoxList control from a data source where the values of the items can be the “Id” column (for example) while the text displayed next to the checkbox is from a “Name” column.

Is it possible to do something similar to this for Access 2003 with VBA? I am trying to avoid hardcoding the list of items if at all possible, but can’t figure out how to do anything similar to this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:47:30+00:00Added an answer on June 10, 2026 at 5:47 am

    Just use a listbox. A list box in Access is great because it allows multiple columns, but will hide the first column as you ask. And you can just set the listbox to allow multiple selections (in the other tab of the property sheet for the listbox, set Multiselect to “simple”

    And even better is you don’t need any code to fill out the listbox, but can type in the sql or simply base the listbox on a SQL query.

    So a listbox can look like this:

    enter image description here

    The code behind the button to turn the selected items into a useful list of PK id looks like this:

    Private Sub cmdFax_Click()
    
      Dim strIDList     As String
      Dim vID           As Variant
      Dim strSQLWhere   As String
    
      For Each vID In Me.lstFaxList.ItemsSelected
    
         If strIDList <> "" Then strIDList = strIDList & ","
    
         strIDList = strIDList & lstFaxList.ItemData(vID)
    
      Next
    
      If strIDList <> "" Then
         strSQLWhere = " ID in (" & strIDList & ")"
      End If
    
      DoCmd.OpenReport "rptFax", acViewPreview, , strSQLWhere
    
    
    End Sub
    

    And if you want, you can in code for supply or set the SQL of the listbox like this:

    Sub mytest()
    
       Dim strSql        As String
    
       strSql = "Select ID, firstName, LastName, City " & _
                "where city = 'Edmonton'"
    
       Me.lstFaxList.RowSource = strSql
    
    
    End Sub
    

    So you don’t need to type in any kind of list here. It not clear if you “must” have a actual check box here – you can use a continues form if you wanted, but I think the above is oh so much more simple and you don’t need much code to set this up at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use ASP.NET and have a label control on my page, which I fill
how can i use request.querystring in asp.net.i have a linkbutton and this is in
ASP.Net MVC Controllers have several methods of forwarding control to another controller or action.
I am building an application in ASP.NET MVC 3 in which I have implemented
i have been building websites using vs 2008 (mostly asp.net mvc, jquery and webforms).
I have a main application in asp.net. There I have an option to send
I have an ASP.NET MVC application I'm building and I'm using a Master page.
Does anyone have any examples of using Sqlite with ASP.NET membership? I am building
I want to create a windows interface in ASP.net which include Taskbar, Windows(have option:Maximum,
I watched a little introduction into ASP.NET Dynamic Data, and I noticed this option

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.