Fill text box based on checkbox

  • Thread starter jmh via AccessMonster.com
  • Start date
J

jmh via AccessMonster.com

I found this code and it works perfectly. What I want to do is when
[ckproducts1] is checked, the value for [txtproducts1] is "Grapes". However
if the user unchecks ckproducts1, then [txtproducts1] should be empty or null.


If ckproducts1 = -1 Then
[txtproducts1] = "Grapes"
End If

Thanks in advance.
 
A

Allan Murphy

Try this code

If ckproducts1 = true Then
[txtproducts1] = "Grapes"
else
[txtproducts1] = Null
End If
 
J

jmh via AccessMonster.com

Thanks! This worked like a charm.

Allan said:
Try this code

If ckproducts1 = true Then
[txtproducts1] = "Grapes"
else
[txtproducts1] = Null
End If

--
Allan Murphy
Email: [email protected]
I found this code and it works perfectly. What I want to do is when
[ckproducts1] is checked, the value for [txtproducts1] is "Grapes". However
[quoted text clipped - 5 lines]
Thanks in advance.
 
A

Allan Murphy

Your Welcome

--
Allan Murphy
mail: [email protected]
jmh via AccessMonster.com said:
Thanks! This worked like a charm.

Allan said:
Try this code

If ckproducts1 = true Then
[txtproducts1] = "Grapes"
else
[txtproducts1] = Null
End If

--
Allan Murphy
Email: [email protected]
I found this code and it works perfectly. What I want to do is when
[ckproducts1] is checked, the value for [txtproducts1] is "Grapes".
However
[quoted text clipped - 5 lines]
Thanks in advance.
 
Top