macro to check checkbox
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
Thank you for taking the time to report an issue.
What's wrong... Please write below.
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.
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.
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.
I will then create a query for a report to only show the records which have a checked box. How do I do this?
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
checkbox 2 is unchecked.
If the Check Box =F Then put the value 0. If I check or uncheck the box I also want to change the value in F_1 to the appropriate 1 or 0. All that happens currently is if I check the box, F_1 = 1 and it doesn't change.
I created this code in the Checkbox properties.
1) Private Sub Feature_1_Click()
2) If IsNull(F1CB) Then
3) Me.F_1 = 0
5) Me.F_1 = 1
6) End If
7) End Sub
2. Checkbox on = Yes; Checkbox off = No