Search results

  1. G

    List Box Not Updating

    I have removed the row-source from the list box and set the VBA code to set the row source = strSQL. If I Debug.Print my strSQL and copy/paste the SQL into a query the proper results are displayed. However, when I tab out of the combo box the list box remains empty?
  2. G

    List Box Not Updating

    I have deleted the query and removed all vba from my project except this line Option Compare Database Private Sub Combo2_AfterUpdate() Me.List11.Requery End Sub And I updated the row source of my listbox to be SELECT * FROM AllData WHERE [Name] = Combo2; Now when I select a name from the...
  3. G

    List Box Not Updating

    Hi - thank you kindly for the response. I need the list box to show a concatenated version of CVN & SVN like in my sample DB. Just one column that shows the concatenated version, which is why I was going with the query. Is it possible to show the concatenated version by editing the row...
  4. G

    List Box Not Updating

    Okay - attached is a database containing non-sensitive data that illustrates my issue. I want the form to load with a blank list box, and on the exit event of the combo box 1) If a name is selected show the CVN & SVN from the query for that name 2) If a name is not selected notify user that they...
  5. G

    List Box Not Updating

    Sure - it will be late afternoon/early evening before I get a moment to de-sensitize data to upload a sample but I will. Thank you so much for the assistance here.
  6. G

    List Box Not Updating

    Sorry, I did not properly explain. Yes my original issue is resolved that the list box loads empty when he form loads. However, a new issue has been created in the fact that on the combobox Exit event, the list box should be populated with the query results and this is no longer occurring.
  7. G

    List Box Not Updating

    Yes, I verified the query was deleted. If I add in the red line you suggest nothing is displayed in the list box after the comboboxOne_Exit() event fires. Query holds accurate information.
  8. G

    List Box Not Updating

    Private Sub Form_Load() List13.ForeColor = vbWhite One Error Resume Next DoCmd.DeleteQuery acQuery, "ListBoxQuery" End Sub
  9. G

    List Box Not Updating

    Adding that line to my Form_Load() event does not change the listbox data.
  10. G

    List Box Not Updating

    AH - so I should add some code in the form_load() event to "clear" the list box? Easiest thing that comes to my mind is to delete the query so the source will be null :D
  11. G

    List Box Not Updating

    I don't want the code to run in the open event of my form because I need to pass the selection from the combo box to the where clause of the query in order to display the relevant data in the list box...
  12. G

    List Box Not Updating

    I have a form that has a combo box and a list box on it. From the GUI of the form, I have set the list box control source = to a query. From the combobox exit event I edit the query to add in a where param. Now my issue is that when the form loads the first time it displays the information in...
  13. G

    Form Layout - Design Question

    How would I set the list box font color to white on FormLoad() then change it to black on the Leave() event of the combo box? What is the VBA for this? I tried this, but the text color is still black when the form loads. Private Sub Form_Load() List13.ForeColor = white End Sub
  14. G

    Form Layout - Design Question

    I am populating a list box with the control source being a query. The query has a where clause added from VBA from the OnIndexChanged() event of a combo box above the list box. So...when the form is opened the list box contains data for the last selection from the combo box because that is...
  15. G

    Auto Resize List Box Based On Text Size

    Thank you so much for your valuable insight. I think I will set the default text size to 8, and if the text is still longer than the width of the list box then the user will be forced to use the horizontal scroll bar.
  16. G

    Auto Resize List Box Based On Text Size

    If I must use a horizontal scroll bar that is okay. I just would prefer to have the list box expand the full width. I am back tracking coming from a C# .NET background which is easy to do in that language, which is what led me to inquire if possible in Access & VBA.
  17. G

    Auto Resize List Box Based On Text Size

    :) - no worries. I appreciate the assistance. A scrollbar would be okay for height, but for width (if possible) I would like to have the listbox expand to show all the text. (i.e. no scrollbar)
  18. G

    Auto Resize List Box Based On Text Size

    It looks like the boombox requires the user to either hover over it, or to click/double click it and a second box will display. I was hoping for a way of the form to auto-resize the listbox based on the text length. I'll go through the other link you provided and see if that provides anything...
  19. G

    Auto Resize List Box Based On Text Size

    Thanks for the quick reply and assistance! Using the link, I really like how this VBA code will auto set the height, but is there something similar that can set the width based off the text? Private Function GetListboxRowHeight() 'Wizhook converts row height perfectly WizHook.Key =...
  20. G

    Auto Resize List Box Based On Text Size

    Is there a way in Access 2016 on my form to have my listbox auto-expand to the width of the text that is being populated in the list box? Essentially for text that is only 50 characters in length the width of the list box is fine as is, but for anything longer than 50 characters can the list...
Back
Top Bottom