Anonymous
Anonymous asked in Computers & InternetProgramming & Design · 1 decade ago

Tick Boxes in Access?

I need help with a code to make a tick box control the content of a text box. Example: If Tick Box A is enabled then "Dog" is inserted into the text box. If Tick Box B is enabled then "Cat" is inserted. If both A and B are enabled then "Dog. Cat" will be inserted.

Any ideas?

1 Answer

Relevance
  • Anonymous
    1 decade ago
    Best Answer

    Dim Opt1 AS String

    Dim Opt2 AS String

    Dim TxtB As String

    If Me!Opt1 = True Then

    Me!TxtB. value = "Dog"

    End If

    If Me!Opt2 = True Then

    Me!TxtB. value = "Cat"

    End If

    If Me!Opt1 = True AND Me!Opt2 = True Then

    Me!TxtB. value = "Dog . Cat"

    End If

Still have questions? Get your answers by asking now.