Results 1 to 12 of 12
  1. #1
    Behrooz is offline Novice
    Windows XP Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    26

    Number of labels

    Hi, Good day. I have a single form that includes a number of text boxes. How can I get the number of labels that the it's text is null ?



    Sent from my SM-J701F using Tapatalk

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Please restate your issue another way.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Therein lies an example of auto correct when using a phone, I'd say. I think the count relates to textboxes that don't have any data in them because a label cannot be blank AFAIK. But why ask for a count of labels rather than a count of those textboxes?? Regardless, to get a count of those labels means the labels would have to be attached to/associated with those textboxes. If they're not attached, difficult if not impossible.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Behrooz is offline Novice
    Windows XP Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    26
    Quote Originally Posted by Micron View Post
    Therein lies an example of auto correct when using a phone, I'd say. I think the count relates to textboxes that don't have any data in them because a label cannot be blank AFAIK. But why ask for a count of labels rather than a count of those textboxes?? Regardless, to get a count of those labels means the labels would have to be attached to/associated with those textboxes. If they're not attached, difficult if not impossible.
    Yes, of course, right, how do I calculate the number of labels whose text boxes are nulls?

    Sent from my SM-J701F using Tapatalk

  5. #5
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,388
    Why wouldn't the number of labels = the number of textboxes?
    Last edited by davegri; 05-18-2019 at 12:30 PM. Reason: sp

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Untested, but something like
    Code:
    Dim ctl As Control
    Din n As Integer
    
    For each ctl in Me.Controls
      If ctl.ControlType = acTextbox And Nz(ctl,"") = "" Then n = n + 1
    Next
    
    Msgbox n
    I have no idea what you want to do with the calculation or what you're going to use to call the code that would perform it. Thus I didn't provide a name for the procedure code I posted and nothing more than a message box to report the count.

  7. #7
    Behrooz is offline Novice
    Windows XP Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    26
    Quote Originally Posted by davegri View Post
    Why wouldn't the number of labels = the number of textboxes?
    It does not matter if the labels are the same as those of the workshop, which if they are disabled, the color of their labels is red, and I have a bar chart of them.

    Sent from my SM-J701F using Tapatalk

  8. #8
    Behrooz is offline Novice
    Windows XP Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    26
    Quote Originally Posted by Micron View Post
    Untested, but something like
    Code:
    Dim ctl As Control
    Din n As Integer
    
    For each ctl in Me.Controls
      If ctl.ControlType = acTextbox And Nz(ctl,"") = "" Then n = n + 1
    Next
    
    Msgbox n
    I have no idea what you want to do with the calculation or what you're going to use to call the code that would perform it. Thus I didn't provide a name for the procedure code I posted and nothing more than a message box to report the count.
    I will use your code. I'll explain. The form is in single mode and includes textboxes in the number of machines in the workshops, each labeled with each txtbox or code of each device. The operator information and the number of devices produced from different tables are obtained. I'm going to get the statistics and graphs of the devices that have their colors distinct and to apply them in subsequent analyzes.


    Sent from my SM-J701F using Tapatalk

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Quote Originally Posted by davegri View Post
    Why wouldn't the number of labels = the number of textboxes?
    I asked that in post 3. No answer.
    @Behrooz - let us know how you make out.

  10. #10
    Behrooz is offline Novice
    Windows XP Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    26
    Sorry if my English language is not good. and sometimes I do not understand what you mean. But I will use your code and I will be glad if you still help me in the future

    Sent from my SM-J701F using Tapatalk

  11. #11
    Behrooz is offline Novice
    Windows XP Access 2013 32bit
    Join Date
    Feb 2019
    Posts
    26
    Quote Originally Posted by Micron View Post
    I asked that in post 3. No answer.
    @Behrooz - let us know how you make out.
    Sorry if my English language is not good. and sometimes I do not understand what you mean. But I will use your code and I will be glad if you still help me in the future

    Sent from my SM-J701F using Tapatalk

  12. #12
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Sorry if my English language is not good
    No apologies for that are necessary. The way I see it, anyone who can communicate in more than one language is more skilled than me. I suggest if you don't understand a question, seek clarification. It may help you if you use a web translator for things you don't understand. You could translate a question into your own language, which might help.
    Good luck.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Number of labels
    By dyhunter in forum Reports
    Replies: 1
    Last Post: 07-11-2016, 11:00 PM
  2. labels and calculations in one
    By tweety in forum Reports
    Replies: 3
    Last Post: 02-11-2013, 06:31 AM
  3. Replies: 0
    Last Post: 01-30-2012, 01:20 PM
  4. Labels
    By cbrsix in forum Reports
    Replies: 5
    Last Post: 12-22-2011, 12:15 PM
  5. Labels
    By MFS in forum Programming
    Replies: 2
    Last Post: 01-28-2010, 07:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums