Topics Search

macro to check checkbox

macro to check checkbox
Views: 19
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.
 

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.
 

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?
 

How do I populate a field with a value using a CheckBox

How do I populate a field with a value using a CheckBox Icon
What I am trying to do should be fairly simple. I have a form with an unbound CheckBox (named F1CB)and a field in record 1 of my table (named F_1). What I want to happen is if the Check Box = T Then put the value of 1 in Field F_1.

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
4) Else
5) Me.F_1 = 1
6) End If
7) End Sub
 

Keyboard shortcuts for checkbox

Keyboard shortcuts for checkbox Icon
Is there a way to define a keyboard shortcut for a checkbox? While doing data entry, everything is done from the keyboard but the check box. I want to be able to check/uncheck from the keyboard, so as to be able to keep tabbing on and entering data, without always moving to the mouse.
 

Convert Checkbox to text

Convert Checkbox to text Icon
Can you assist me in converting a checkbox to text? I need to do it two ways: 1. Checkbox on = X; Checkbox off = (null)
2. Checkbox on = Yes; Checkbox off = No