• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 598
  • Last Modified:

access: link textbox to checkbox in query

I attach my dbse “Completion matters”

First, go to the Form
Go to tab called chaps.

On that from there are a number of text boxes and corresponding tick boxes.

When I tick a box the text box turns colour red.

What I want to do is make a query that tells me which of the boxes is not red or
alternively is not ticked against.

At the moment there is no other code connection between thew boxes other than the colour red/ black.

The “ colour” code operates on the update of the check box.

What is the best way to run a query based on what I want to do, which is to tell me which text boxes do not have a tick against them?

Thanks



practice-completionDatabase.mdb
0
topUKlawyer
Asked:
topUKlawyer
  • 11
  • 10
1 Solution
 
RgGray3Commented:
Your question is a little confusing...

Let me restate it and see if I have it right....

You want to create a query, that identifies which checks are not selected.

Are you looking to return full records for any record that has ANY check not selected

If so...   simply insert FALSE in the criteria section of your query under each of the columns...
To clarify...   if you want any record that does not have ALL of the checks selected
Put a False under each column but on seperate rows in that column

0
 
topUKlawyerAuthor Commented:
Sorry to be confusing....

I would like ANY record which has an unchecked text box on that form showing up in the query/report
0
 
topUKlawyerAuthor Commented:
no thats not true apologies...

I want any record iin the query that HAS a black entry (ie has an entry that is unchecked) to show up

BUT NOT any text box entry on that tab which is checked/red
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
topUKlawyerAuthor Commented:
blank text box and no tick doesnt show up

red text and tick shows up.
0
 
RgGray3Commented:
FYI...

You can manage the color logic without the code...

Use conditional formatting...

Select the textbox that is associated with a particular checkbox

Select the [to whom sent 1] text control
Select Format from the menu and Conditional formatting from there.

You will get a dialog box that allows you to create different formatting based upon your logic
in this case...  if [Check325] = True    

BTW,  for clarity I would give your check boxes that make it easy to see the relationship between the check and text controls  IE txtWhoSent1 and chkWhoSent1

If you use conditional formatting you no longer require code to manage the "Flag" nature of your color coding

0
 
topUKlawyerAuthor Commented:
forgive me,

blank text box and no tick doesnt show up

BLACK text and no tick shows up.

RED text and tick is excluded

0
 
RgGray3Commented:
Go back to my original post...  in your query  (names were changed for simplicity)

Check1    Check2   Check3   Check4
---------|----------|---------|---------
False
               False
                               False
                                             False

A seperate false for each column on a seperate row in the query builder grid
0
 
topUKlawyerAuthor Commented:
rationale is that where my cashier sees a BLACK text and NO tick shes knows to enter it inot separate accounts.

When shes entered its tocked and turns red

BUT she wants a list of unticked BLACK items to show whats remainng to be entered

phew.... thanks
0
 
topUKlawyerAuthor Commented:
cool sounds like i am over complicating it.

Just for my info... i get the false bit but why the separate row and whats happening there...
0
 
RgGray3Commented:
OK... for clarity...

you need to identify A) If the text Box is Blank...  
                       AND B)there is NO tick

OR

you need to identify A) If the text Box is Blank...  
                         OR B)there is NO tick

0
 
RgGray3Commented:
If you place the falses on the same line...  they become an AND  instead of an OR

Meaning...

ALL of the 4 fields would need to be false to become part of your result
0
 
topUKlawyerAuthor Commented:
not sure if its there yet..

because someone else is entering the black entries she needs to filter IN the BLACK entries and filter OUT the blank ones.
0
 
topUKlawyerAuthor Commented:
thanks for the explanation for the rows.
0
 
topUKlawyerAuthor Commented:
the reason why she needs to filter out the BLANK ones is that she needs to locate those black entries

would it something like this:

if contents of text box <>0 then checkbox is something so she could pick up the checkboxes.

0
 
RgGray3Commented:
OK...  we are getting somewhere...  good.

Let's clarify the question...  then the logic will follow..

You need to separate Those where the Check is not selected AND the corresponding field is blank..  correct...?

If so....  now we use field pairs in the criteria. (I'll do this for 2 sets....   the same logic would need to be done for the additional pairs)

  Check1        Text1      Check2       Text2
-----------|------------|-----------|-----------
False         is null or ""
                                     False         is null or ""

Depending on how your table is constructed and validity rules...   I am assuming that the text field can be blank or hold an empty string...  (there is a difference)  and there is no penalty in testing for both

Do the same for Pairs 3 and 4 and you should have it.
0
 
RgGray3Commented:
If you are looking for those that are Blank and have a checkmark...  simply replace the false with True
0
 
topUKlawyerAuthor Commented:
I think we are getting there too i need to FIND those text boxes with "something in them"

AND which dont have a check mark ticked.

please forgive my logical flaws.

It would appear from what you say the colour is a red herring (joke)

0
 
RgGray3Commented:
UGGH....   (but funny)

Yes...  leave color out of the logic...

Checkmarks are True or False
Data is there or it's NOT (Null or Empty)

SO....  you logic becomes IS NOT NULL  AND  (Not"") in the text fields
           or we could use LEN()
           (but I don't want to complicate it now...  just let that one hang out for a while)

Now I have just gotten more confused....
It appears that the checkboxes are not "Bound" to a data field

Am I missing something?
0
 
RgGray3Commented:
Just double checked...
There is no Control Source for the check marks...   this would need to be stored somewhere to perform logic against it...
0
 
topUKlawyerAuthor Commented:
thats ok i can fix that just go back to the table and make some new ones

thanks for pointing that out...i'd forgotten

i will award points to you and if i get into any diffculties i will post a re-comment but i can see where im going......

ty

0
 
RgGray3Commented:
Good luck and let me know if you have additional problems

Rich
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 11
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now