Topics Search

macro to check checkbox

macro to check checkbox
Views: 18
I have no training in aand no idea how to use VBA. I have set up a simple database to enter data into then upload to a client web portal.

I have a form to enter the data and the table this data goes into has a check box at the end which I want to have ticked/checked/True after I have exported.

I have created a query that shows me all data that is un checked (not yet exported to an xls)

I have created a simple export macro that sends the query result to an .xls

I want the macro to finish by checking the "export" checkbox once I have done this.

I am using Access 2010 attached is a screen dump of what I have so far
Sponsored Links:

Similar posts...


How to make an active checkbox in a report?

How to make an active checkbox in a report? Icon
I have a form that runs a query that automatically opens a report. My report includes a checkbox field that correlates to each entry. I want the checkbox to be active in the report. Is there a way to do this?

I want to be able to double check the document attached to every entry and then check the box when it has been checked. However, I want the checkbox to be usable on the report so the user doesn't have to go into the table to check it.

Right now, the checkbox is only an image and isn't interactive on the report.

Clearing Checkbox on New Record

Clearing Checkbox on New Record Icon
Is there a way to clear a check box in a form if you add a new record?

I tried:

If Me.NewRecord = True Then
Me.checkbox = False

That doesn't seem to work when I have placed a check in the checkbox on the current record, and then create a new record, the checkbox stays.

Check box to trigger event

Check box to trigger event Icon
I've tried using a macro as follows:
I have a form with a checkbox. I'd like, when the user checks the box, for another box to appear. I have that box set to invisible.

I created a macro, and all it is supposed to do is change the property of the box to visible. I've assigned that macro to the On Click event of the checkbox.

When I check the box I get the following error:
"An expression in argument 3 has an invalid value.
You tried to run a macro or used the DoCmd object in Visual Basic. The argument number above is the position of the argument as it appears in the Macro window, the Action Failed dialog box,or the Object Browser (if you're using the DoCmd object)."

When I clear that message, I get the Macro Single Step dialog box which lists the macro name, a blank condition box (because there aren't really any), the Action Name (which is SetProperty)and the Arguments box, which has the name of the field I want to make visible, then the number 1.

The error number is 2505.
All I want to do is have the user check the box, and make this box appear. Otherwise, I don't want the box to appear.

Close window, check boolean

Close window, check boolean Icon
I am really new to access and I was looking for some help. I need a macro to run when I close a certain form, and then check to see if a boolean is checked more than once. I have different years and I would like to have one year be current. I can select current via a check box, and I would like the macro to check to see if the checkbox is checked two or more times. If it is a need it to return a message box and then re open the form. I am having a hard time specifying the form that closes, and also checking the error. I appreciate any help I can get on this.

VBA Access, checkboxes

VBA Access, checkboxes Icon
On a form with few lines, where each line has a checkbox (the same one, with one name), when I check the checkbox, how can I make the code understand that this checkbox belongs to a specific line?
Because as it is now, if for example I check the third line's checkbox the code just takes the first line, it doesn't know what line exactly I'm referencing.
In short: how can I access a checkbox of a certain line?

Creating check boxes

Creating check boxes Icon
I'm a new access user and trying to create a yes/no checkbox. I have added the checkbox in the subform, but when I check it, for one record, it check all the records. I want to individually check which record of information I need.

I will then create a query for a report to only show the records which have a checked box. How do I do this?

Unmark check box based on a text field

Unmark check box based on a text field Icon
I have a checkbox defaulted to being check. Once a person enters in a date in a text box then the checkbox should be unchecked. Sometimes, the checkbox can be unchecked if the text box is blank.

So what I want to do is once a date is entered then the checkbox is unchecked but I do not want the check box to be checked if the date is later removed.

checkbox_xyz = not isnull(date_textbox)

This checks and unchecks the checkbox based on the textbox status.

I also tried:

if not isnull(date_textbox) then checkbox_xyz = 0
if not isnull(date_textbox) then checkbox_xyz = false

Count of records where checkbox 1 is unchecked, checkbox 2 is chec

Count of records where checkbox 1 is unchecked, checkbox 2 is chec Icon
I have a table with several check boxes. I'd like to place in the report footer a count of the number of records where both conditions exist: checkbox 1 is checked
checkbox 2 is unchecked.

How to check checkbox depending on string

How to check checkbox depending on string Icon
I want to make a checkbox do something like this:

IF strlen(notes) >= 1 THEN check1 = true

notes=column with notes

If there is something written in the column "notes" then I want to check the checkbox. It doesn't feel too difficult, but I just can't figure it out!

Some one here who can help me?

Right Click checkbox to uncheck?

Right Click checkbox to uncheck? Icon
I have a number of check boxes on a form with control sources of fields in a table. I want the user to be able to left-click on a checkbox to "check" it, and right-click on a checkbox to "uncheck" it. How would I go about doing this?