Empty Textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scott Price
    Recognized Expert Top Contributor
    • Jul 2007
    • 1384

    #16
    Set your text boxes unbound. In the afterupdate event of your combo box, set the control source back to the fields they should be bound to.

    [CODE=vb]Me!Text20.Contr olSource = "[FieldName]"[/CODE]

    Regards,
    Scott

    Comment

    • Beany
      New Member
      • Nov 2006
      • 173

      #17
      Originally posted by Scott Price
      Set your text boxes unbound. In the afterupdate event of your combo box, set the control source back to the fields they should be bound to.

      [CODE=vb]Me!Text20.Contr olSource = "[FieldName]"[/CODE]

      Regards,
      Scott

      thank you for all replies so far,

      ok ive made the textbox unbound, and placed the following code in the combobox after update event:

      Code:
      Private Sub Combo2_AfterUpdate()
          blnUser = True
          FilterSubForm
          
          Me!Text18.ControlSource = "[txtCountID]"
      
      
        Combo4.Enabled = False
        Combo6.Enabled = False
      Me.Combo2.Requery
        
      End Sub
      Ive changed the textbox name to Text18..


      but im getting an error : #Name? in the Text18 textbox, ie the Number of Items textbox (see attachment in previous post)

      Comment

      • Scott Price
        Recognized Expert Top Contributor
        • Jul 2007
        • 1384

        #18
        Originally posted by Beany
        thank you for all replies so far,

        ok ive made the textbox unbound, and placed the following code in the combobox after update event:

        Code:
        Private Sub Combo2_AfterUpdate()
            blnUser = True
            FilterSubForm
            
            Me!Text18.ControlSource = "[txtCountID]"
        
        
          Combo4.Enabled = False
          Combo6.Enabled = False
        Me.Combo2.Requery
          
        End Sub
        Ive changed the textbox name to Text18..


        but im getting an error : #Name? in the Text18 textbox, ie the Number of Items textbox (see attachment in previous post)

        [txtCountID] is the name of the column returned by your query? I should have made that clearer... You reset/bind it to the name of the field it was bound to originally from the query.

        Regards,
        Scott

        Comment

        Working...