Results 1 to 4 of 4
  1. #1
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206

    TextBox bug I can't figure out

    I have a comboBox in a form that takes data from a table, and adds it to another table. The form displays the info. in a textBox (txtBin). All works great till I get to the number 91 and the txtBin will show "Top Red Bin 1 Row A Col 1 Comp 1", when I select 90 in combBox I get "Res 90 Row E Col 6 Comp 3" in txtBin. If I select 100 I get "Top Red Bin 10 Row A Col 3 Comp 2". If I select 120 I get "Top Red Bin 30 Row B Col 4 Comp 2". It seems to add the first two numbers and drop the third. All numbers below 90 work as intended in the textBox on the form. The correct Data is always in the updated table location as intended by slection from combBox. The problem is just in
    Me.cboLocation.Column(1), all the other info. is correct.
    What can I change or look for to fix this problem? Be glad to supply more info. Thanks! MS office 360



    Code:
    Private Sub cboLocation_AfterUpdate()
        On Error Resume Next
        Dim Bin As String
        Bin = Me.cboLocation.Column(1) & "   <strong>Row</strong><em> " _
           & Me.cboLocation.Column(2) & "   </em><strong>Col</strong><em> " _
           & Me.cboLocation.Column(3) & "   </em><strong>Comp</strong><em> " _
           & Me.cboLocation.Column(4)
              Me.txtBin = Bin
        End Sub

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    you could debug.print the column values to ensure they're what you expect, or just debug.print me.txtbin and see what you get. If it's OK, I suspect the issue is there's an expression or a format in txtBin control that is the problem.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    What is in Column(1)?

    What is combobox RowSource?

    Show some sample data.

    A missing </em>.
    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.

  4. #4
    MadTom's Avatar
    MadTom is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jun 2018
    Location
    CT and VT
    Posts
    206
    I believe I found the problem! The info. in column was there, but didn't show because it was a longer string. I will make some changes and test some more. Thanks

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

Similar Threads

  1. Can't figure out to to get what I want
    By Dave14867 in forum Forms
    Replies: 16
    Last Post: 10-26-2018, 03:11 PM
  2. Replies: 4
    Last Post: 01-24-2015, 08:26 PM
  3. Can't figure out how to do this query
    By delorean004 in forum Queries
    Replies: 1
    Last Post: 12-22-2014, 04:33 AM
  4. Cant Figure This Out
    By tabbycat1234 in forum Forms
    Replies: 12
    Last Post: 07-27-2011, 02:19 AM
  5. Can't Figure It Out!!
    By jdohio5 in forum Database Design
    Replies: 1
    Last Post: 05-04-2006, 06:49 AM

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