help with simple if else command

Thanks Paul.

You obviously tested it. Thanks.
 
I need a check box not a text box
 
I don't know how to go forward.

If you go to the design of the table and click on Data Type and press F1 you may find some more information.
 
Have not left but simply do not know how to have a Check Box and 1/0.

This is what Access help says. And this is why I suggested you go there yourself.

We could do a Combo Box and select one or the other. However a Check box is a check box that has a tick or not. I can't do anything about that.

What would you like me to do for you.

And I will be leaving you soon. Need to get some sleep before the sun comes up. I can do more tomorrow if you can explain better what you want.
 
I found this snipet on MS website

it loops through all the Y/N fields and changes their values from -1,0 to 1,0

Dim ctl as Control

For Each ctl in me.controls

if ctlControlType = acCheckBox (?) then

if me.ctl.value = -1
myval = 1
else
myval = 0
end if

end if



next ctl
Dim ctl as Control

For Each ctl in me.controls

if ctlControlType = acCheckBox (?) then

if me.ctl.value = -1
myval = 1
else
myval = 0
end if

end if



next ctl
Dim ctl as Control

For Each ctl in me.controls

if ctlControlType = acCheckBox (?) then

if me.ctl.value = -1
myval = 1
else
myval = 0
end if

end if



next ctl Dim ctl as Control

For Each ctl in me.controls

if ctlControlType = acCheckBox (?) then

if me.ctl.value = -1
myval = 1
else
myval = 0
end if

end if



next ctl Dim ctl as Control
For Each ctl in me.controls
if ctlControlType = acCheckBox (?) then
if me.ctl.value = -1
myval = 1
else
myval = 0
end if

end if

next ctl
 
sorry about the last post it should read

Dim ctl as Control
For Each ctl in me.controls
if ctlControlType = acCheckBox (?) then
if me.ctl.value = -1
myval = 1
else
myval = 0
end if

end if

next ctl
 
David

What have you done. Did you run it. If so what was the result.
 
David

What is happening. I am truely interested in the result.
 

Users who are viewing this thread

Back
Top Bottom