How to check a checkbox from vba?

Community Beginner ,
Aug 06, 2017

Copy link to clipboard

Copied

Hi,

I am filling up PDF forms from Vba in Microsoft Access. Everything goes fine, except that I am unable to check checkboxes from my code.

My code is pretty simple, something like that :

Set field = jso.getField("checkboxfieldname")

field.Value = True

I tried everything I could think of: 1, "1", "On, "on", True, "checked", etc. Nothing seems to work.

I looked at the SDK: nothing on how to check checkboxes from vba in the documentation, nothing in examples either...

I'm sure the answer is simple 🙂

Thanks for your help,

Patrick

TOPICS
Acrobat SDK and JavaScript

Views

2.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to check a checkbox from vba?

Community Beginner ,
Aug 06, 2017

Copy link to clipboard

Copied

Hi,

I am filling up PDF forms from Vba in Microsoft Access. Everything goes fine, except that I am unable to check checkboxes from my code.

My code is pretty simple, something like that :

Set field = jso.getField("checkboxfieldname")

field.Value = True

I tried everything I could think of: 1, "1", "On, "on", True, "checked", etc. Nothing seems to work.

I looked at the SDK: nothing on how to check checkboxes from vba in the documentation, nothing in examples either...

I'm sure the answer is simple 🙂

Thanks for your help,

Patrick

TOPICS
Acrobat SDK and JavaScript

Views

2.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 06, 2017 0
Adobe Community Professional ,
Aug 06, 2017

Copy link to clipboard

Copied

What is the export value of the check box?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2017 0
Community Beginner ,
Aug 06, 2017

Copy link to clipboard

Copied

What do you mean by "export value"?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2017 0
Adobe Community Professional ,
Aug 06, 2017

Copy link to clipboard

Copied

You will get this value from field.value when the box is checked.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2017 0
Community Beginner ,
Aug 06, 2017

Copy link to clipboard

Copied

No, that's the contrary. The checkbox is read only for the user. I just want to be able to check it from my vba code when I fill in the form.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2017 0
emphyrio LATEST
Community Beginner ,
Aug 06, 2017

Copy link to clipboard

Copied

OK, actually, you gave me the answer 🙂

I had to set the field to the value specified in its "Export value" property to get the box checked.

In my case, it was "Oui" (Yes, in French).

Thank you !

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2017 0