Checkbox output to text in table record? (1 Viewer)

coronatus

New member
Local time
Today, 12:27
Joined
Oct 28, 2012
Messages
3
Hello,

I hope someone understand this. For me it's hopeless... and maybe it's not possible..

I have tried much in vb code. I know nearly nothing about it.
But the only thing what I want is here:

In the form if the checkbox is checked the record in the table has to change in text. When checkbox is unchecked the the record in the table must be empty too. I have 5 checkboxes for one column.

The thing what is frustrating me is that when I click on one checkbox the other checkboxes are checked too, but I want only one checkbox checked and the others unchecked. But each checkbox have to put difference text into the table record of one column.

In the form:
registration checkbox.jpg

And in the table:
table.jpg

Thanks​
 
The thing what is frustrating me is that when I click on one checkbox the other checkboxes are checked too, but I want only one checkbox checked and the others unchecked. But each checkbox have to put difference text into the table record of one column.

Normally, what you need, it should be possible. How you created check box? You may delete and recreate. Have you created individual check box or by Option group?

In the form if the checkbox is checked the record in the table has to change in text.

Do you want check box field in the table to be converted to text!!!

Instead, you may write a code to insert a particular text to be entered in a specific field when checkbox is clicked. Will that do?

I have tried much in vb code. I know nearly nothing about it.

Instead, if you have given what you tried, then by looking at your efforts direction, one could have made out what you are looking for.

regards.
 
The thing what is frustrating me is that when I click on one checkbox the other checkboxes are checked too
It sounds to me like you have unbound checkboxes. That is to say the checkboxes do not have a control source from the underlying table.

To remedy this EITHER include a yes/no field in your table (this does not need to be relevant to the data in your table) OR make the default view of your form Single Form not Continuous form.


In the form if the checkbox is checked the record in the table has to change in text
This all depends on what text you want to have entered. The basic of this would be some code in the checkboxes OnChange event like;
Code:
If Me.CheckBoxName = True Then
    Me.FieldName = "Whatever"
Else
    Me.FieldName = ""
End If
The following would allow the user to enter whatever data they want to record
Code:
If Me.CheckBoxName = True Then
    Me.FieldName = InputBox("Please enter data", "Input Required", "")
Else
    Me.FieldName = ""
End If
 
First of all manhenkj2, Isskint Thanks for the quick response!@ Because I don't know how to double quote I do it on this way copy paste..

mahenkj2: Have you created individual check box or by Option group?
No they are individual check boxes.

Do you want check box field in the table to be converted to text!!!
Yes I do.

Isskint
If Me.CheckBoxName = True Then Me.FieldName = "Whatever" Else Me.FieldName = "" End If
I've tried this sort codes but is doesn't work.
The OnChange doesn't exist in access, I've created it but also don't working.

I have an image of it.
 

Users who are viewing this thread

Back
Top Bottom