Results 1 to 4 of 4
  1. #1
    manic is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    63

    Text Box Help.


    Hello All.

    let me start with this; I have a form that consists of mostly checkboxes that have different values. I wanted that everytime i make a checkbox selection it dumps that value on a textbox and so on. I use this code behind the afterupdate on a checkbox:
    Code:
    Private Sub ChkFail01_AfterUpdate()If Me.ChkFail01 = True Then
    Me.ChkSafe01 = False
    Me.TxtFails = Me.TxtFails & "; " & Me.CboQuestion01.Column(0)
    End If
    End Sub
    
    Private Sub ChkFail02_AfterUpdate()
    If Me.ChkFail02 = True Then
    Me.ChkSafe02 = False
    Me.TxtFails = Me.TxtFails & "; " & Me.CboQuestion02.Column(0)
    End If
    End Sub
    so the textbox will get filled with different values depending on the checkboxes.
    My question is, is it possible to remove a value that has been entered in the textbox? example, if I question one has 2 check boxes and i select answer 1, so answer one get in the textbox, but then i decided that i want to choose answer 2 instead, is there a way that by choosing answer two answer one will be deleted and replaced with answer 2 in the text box?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Why not wait until the user is done with the Form? Use the BeforeUpdate event of the Form.

  3. #3
    manic is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    63
    Thank you my good sir, i did not think about that. Solved.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help and you are welcome.

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

Similar Threads

  1. Replies: 2
    Last Post: 07-21-2012, 01:21 AM
  2. Replies: 1
    Last Post: 06-04-2012, 04:31 PM
  3. Replies: 1
    Last Post: 05-24-2012, 04:59 AM
  4. Replies: 2
    Last Post: 03-01-2012, 12:21 PM
  5. Replies: 15
    Last Post: 04-01-2011, 11:41 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