|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Checkbox to Text?
I want to set up a field in one of my forms where if a checkbox is checked in another form, it will display a piece of text in the second form's box. I know this should be easily done with an if-then statement, but though I know how I could formulate the If part (At least I think anyway), I don't know where to start for the Then part.
Basically I want it to say this: If [Checkboxa] = -1 Then Print "Texta" in "BoxA" I want this to happen for about 30 checkboxes, but all of them would print in the same box. Is that possible? Thanks for your time, Mink |
|
#2
|
|||
|
|||
|
Mink,
As far as the syntax If [CheckboxA] = -1 Then [txtBoxA].Value = "Texta" End If But do you mean you want to add thirty (30) strings of text into one textbox? lwells |
|
#3
|
|||
|
|||
|
It needs to have the possibility to add up to 30 strings to the textbox if that is possible. Otherwise I will probably have 30 possible smaller text boxes in an area that can possibly have test in them.
What I am having it do is we have approximately 30 models of the product that we make and we need a text box in one area listing the models that are affected by a certain change on a printed report. |
|
#4
|
|||
|
|||
|
I think what I need to do is run some code to build a variable based on wether the checkboxes are checked or not, but I am not sure how to build a variable, and then call it in access.
Also, for another area that I am working on I use a similar bit of code. However I am not sure of the syntax to have it check for two conditions before printing text. How can I do that and have it work? Right now it is always returning the RM instead of going by the two checkboxes. The results with this should either be M, RM, or blank. Private Sub Form_Load() If [Model Change] = -1 And [Running Change] = -1 Then [MYdata].Value = "RM" End If If [Model Change] = -1 And [Running Change] = 0 Then [MYdata].Value = "M" End If End Sub |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Checkbox to Text? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|