Results 1 to 3 of 3
  1. #1
    Georgekobanda is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2020
    Posts
    2

    Filling a combox y clicking list box

    I am working on a project and i would like to click a list box then the values get filled in a combobox. It works well with TextBox but it doesnt work with combobox. Below is my code combo1 is a combobox field

    Private Sub listboxmachine_Click()
    With listboxmachine
    combo1.Value = .Column(0)


    Litres.Value = CLng(.Column(1))
    End With
    End Sub

    Thank you

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    you can do:
    combo1= .Column(0)

    IF .Column(0) exists in the combo.
    but if you use keys and the combo has 2 columns like:
    1, Land Line
    2, Cell
    3, Work

    and the combo is bound to Col 1 (the key)
    then you cannot assign "cell" to the combo box. You must assign 2, and CELL will appear.


  3. #3
    Georgekobanda is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2020
    Posts
    2
    Thank you for your quick repsonse, otherwise, if i try implementing this code, i get an error of Invalid or unqualified reference

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

Similar Threads

  1. Double Clicking a List Box
    By UT227 in forum Programming
    Replies: 3
    Last Post: 06-24-2018, 12:58 PM
  2. Combox list box
    By tmcrouse in forum Forms
    Replies: 2
    Last Post: 04-28-2014, 06:49 PM
  3. Forms, Combox Edit List Option
    By RoundTrip in forum Access
    Replies: 7
    Last Post: 03-02-2014, 09:13 PM
  4. Combox box Item List
    By engr_saud1 in forum Access
    Replies: 1
    Last Post: 04-04-2013, 06:50 AM
  5. Combox not filling the rest of the form
    By britt britt in forum Forms
    Replies: 2
    Last Post: 10-27-2009, 04:55 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