0

I'm trying to add a Checkbox column to a result table from a query. A form that displays the result table that I need already exists but I need two extra columns in the table. One with a checkbox and another one for text.

So far I've copied the form and the query that gives me the table but I now need to add columns and I can't seem to find a way to do that unless there already is a table that has a checkbox. The one to be used in this Form shouldn't exist outside of the Form though, so I don't want to do that.

5
  • This question needs cleaned up. You are referencing three different ms access objects, and then sometimes crossing the name making it hard to determine what the problem is, and what you are trying to achieve. Are you trying to add a checkbox to a query that is not in the table? You refer to a form, but are we working with a subform in the datasheet view? Can you provide screenshots to help clarity? Commented May 16, 2019 at 13:28
  • @ChanceFinley sorry I'm quite new to the topic. I don't know if I can show any screenshots because it's work related. I will try to clarify what I have and what I need however, hoping that that will help. There is a form that when opened displays two tables which to my understanding are filled with a query. (The Source object given is another form which has a Record Source that is a query.) I need the same view as in that. A form displaying another form filled with query results but with 2 extra columns so the user can work/edit the table. I really hope this clears things up a bit. Commented May 16, 2019 at 14:08
  • ETA: @ChanceFinley I believe you're right although I'm not sure what a subform is. "Are you trying to add a checkbox to a query that is not in the table? " -what I meant was that I could create a table and add only one checkbox column to it and then join the tables in the query to get the checkbox, But that seems very dirty imo. Commented May 16, 2019 at 14:29
  • You could recreate what you are trying to create with Generic Names and so forth to recreate the problem, without compromising work related information. I do this all the time for my questions Commented May 16, 2019 at 14:32
  • Now that ive seen that examples, feel free to remove them if you are feeling unsafe about work related issues. Commented May 16, 2019 at 15:18

1 Answer 1

1

Thanks for the screenshots. I think I've got it now.

Adding a checkbox to a Form/Subform(Form within a Form), you can...

Add a checkbox, and not tie it to a record. Leave it unassigned. When the Form displays in "Datasheet View" it will display with each record. Changing its value per row will not affect anything in the underlying database, but can be used for vba code operations for that screen.

If you are adding a checkbox to a QUERY, your hands are tied with one option

Add a checkbox to one of the tables that is used in the query, however this will have to be named something generic to ensure people looking at the underlying data know that this is a bogus box

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks a lot. Will try this tomorrow. Option 1 seems a lot like what I was looking for.
Edit if anyone cares: Accepting this although I have to go with the ugly option apparently since an unbound checkbox checks every single record when one is checked which isn't what i want because I need a selection. That doesn't make this answer wrong though, it's just inconvenient for me. (Unless I'm doing something horribly wrong) Thanks again for your time and help
@veryBadProgrammer Sorry I couldn't be of more help, however thanks for the acceptance of the solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.