Solved Checkbox question

ProgramRasta

Member
Local time
Today, 13:40
Joined
Feb 27, 2020
Messages
98
Hi All,

I have what is hopefully a very quick question.

I have a form where the detail section is populated based on a query. There are two fields that can have variable number of records returned. I was wondering would it be possible to add a checkbox for each record that is returned without assigning a checkbox to a table?

this form will be opened based on a checkbox from another form. What I want to do is, if the person opens this form, they can tick a checkbox and it will return the value to the main form.

hopefully I’m making sense!

many thanks
 
Hi. Sorry, it didn't make sense to me. Can you, maybe, illustrate what you mean by using some mockup data? Thanks.
 
I am also a little confused but I wonder if a listbox may be a better choice.
 
Hi. Sorry, it didn't make sense to me. Can you, maybe, illustrate what you mean by using some mockup data? Thanks.

Hi DBGuy,

thanks for taking the time to reply. this is a very rough sample!

In Form1 - I want the detail section to be populated based on query1 - I want a checkbox populated for each record returned in query1.

The goal is, if someone clicks on the checkbox on a specific record, this will populate that record on a different form.

I appreciate your help.
 

Attachments

Wow, that really makes no sense to me. I have no idea what you are talking about. You need to really explain this. Take your time explaining, because that example is useless.
 
Still a little confused.

An unbound checkbox will carry its value from record to record. So all records in the forms recordset will include the same value.

Might be better if you describe in real terms what you want to do.
 
Might consider using a button instead. That way if they click on the button next to a given record, you can write code to take the values from that record and put them somewhere.
 
Apologies, the sample was rushed and obviously didn't do the job.

I figured out the issue.

thanks for replying.
 
Apologies, the sample was rushed and obviously didn't do the job.

I figured out the issue.

thanks for replying.
No worries. Glad to hear you got it sorted out. Cheers!
 
Hi All,

Apologies for the rushed database yesterday.

I've made some small amendments to the database which hopefully makes my question clearer.

In Form1 (that is populated from Query1) you will see checkboxes populated.

If I click any checkbox, it clicks all checkboxes, my question which obviously wasn't clear yesterday is, is there any way I can click just one of the checkboxes and it will return the record (from query 1) where the row is the same? If it's not possible please let me know and hopefully provide a better alternative.

Many Thanks
 

Attachments

there is Only 1 checkbox, so clicking 1 will check all.

there are 2 unbound textbox i added, txtList and txtAdd.
plus 1 command button on top of txtAdd, It has transparent background.
see the code behind the Click event of this button.
there is also a Conditional Format on txtAdd textbox.
 

Attachments

there is Only 1 checkbox, so clicking 1 will check all.

there are 2 unbound textbox i added, txtList and txtAdd.
plus 1 command button on top of txtAdd, It has transparent background.
see the code behind the Click event of this button.
there is also a Conditional Format on txtAdd textbox.
Many thanks for your time. Have a great weekend.
 
some minor fix.
Thanks again, there seems to be a minor bug whereby if I click ID15, it will also highlight ID5, ID14 will highlight ID4 etc.

If I wanted to populate the ID field based to a different Form based on the click event - will I reference the txtlist textbox?

I am clearly not too advanced in Access!
 
Rather than using checkboxes, try using a listbox on a form as moke123 suggested in an earlier post. See attached.

Thanks for the reply - is there a way to populate another form from a list box based on which record is clicked?
 
Thanks for the reply - is there a way to populate another form from a list box based on which record is clicked?
Again a better explanation of exactly what you want to do would help to get more focused answers. Do you want to limit the selection to one record or multiple records? If one record the code is simple, if multiple its still easy but more complex.

example:
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom