Using Check Boxes in a form

S

Sara P.

Hi,
I would like to use OnEnter to place the check in a check box and then be
able to tab to the next feild on my form but I currently have the Keyboard
option to go to a new record OnEnter. Is there a way to do both? Any other
ways to go about it?

Thanks in advance,
Sara
 
G

guat

Sara,
I am sorry I cann't answer but have the same question. I want to have a
check box on a subform where I can create entry to another table.
Var
 
G

guat

Sarah,
I have the same problem. I want to select options from a list using a check
box and link that to a adding a new employee record in another table.
Any thoughts?
Varvara
 
H

hdfixitup

Try this: Place a check box on the form. In design view, scroll down to the
OnEnter row, select Event Procedure and click elipsis to the right of Event
Procedure. This will open up VB and type:

Me!"Name of check box" = -1

This will place a check box in the box on entry; NO quotes arond name of
check box THEN

Go back and select Event Procedure on the AfterUpdate row, enter VB and type

DoCmd.GoToControl "name of field you want to go to"

Leave the quotes around the name of field.

This will move the control to your selected field after the check box is
filled.
 
S

Sara P.

Hi,

That sort of worked and it makes sense but what happens is that I only want
to use enter to indicate that a certain item has been submitted and be able
to leave it blank if it wasn't. Also as soon as I use the enter cmd it pops
me to the next record and the next field which I'm trying to get it to just
go to the next field in the same record. Any ideas?

Thanks,
Sara
 
S

Sara P.

Sorry I wish I could help but I'm stumped.

Sara

guat said:
Sarah,
I have the same problem. I want to select options from a list using a check
box and link that to a adding a new employee record in another table.
Any thoughts?
Varvara
 
H

hdfixitup

Sara,

I think you are somewhat confused. OnEnter refers to the cursor as it
enters that field (Event shall occur), NOT when you press Enter on the
keyboard. You should be using the Tab key to move between fields and the
Spacebar to fill the Checkbox. If this makes sense, let me know and I can
probably give you some help. I think you want to place a check in your
checkbox as you tab into or click that box, and have ir move automatically to
the next field.

hd
 
S

Sara P.

Hi,
That's exactly it but now things are really making sense and yes I would
like to have to use the spacebar to enter the check in the checkbox. Right
now with the code you've given me it automatically places a check in the box
and sends me back to VB when I try to remove it, so......how do I change
that?
Thanks again for your help.

Sara
 
H

hdfixitup

Let's start over; Place the checkbox on the form in design view, and in the
properties menu select After Update; enter Vb and type the following
SendKeys "{TAB}", False

when you enter the checkbox, hit the spacebar, the check will appear and
then the cursor will move to the next field. That field can be changed by
selecting the proper order in the Tab Order on the View Menu toolbar inside
Design View of the form.
 
S

Sara P.

Hi,

Well I guess this is one way to learn.... that worked perfectly! Thank you
again for all your help it's been brilliant!

Regards,
Sara
 
Top