Solved

report problem

Posted on 2002-07-09
11
137 Views
Last Modified: 2010-05-02
i am having 5 forms with many textboxes

i can enter the data in the textbox or i won't enter the textbox.

i need the report of what i have typed in the textbox with its label.

note: I will enter only 2 datas in the in the 1st form
   i Will enter 3 datas in the second form.

i have to get the printout of the 5 textboxes with its label.


thank u
please reply me very soon
0
Comment
Question by:vjey
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
ID: 7140370
Try this:

Dim frmToScan As Form
Dim ctrlToCheck As Control
For Each frmToScan In Forms
  For Each txtToCheck In frmToScan.Controls
    If TypeOf ctrlToCheck Is TextBox Then
      If ctrlToCheck.Text <> "" Then
         Debug.Print ctrlToCheck.Name & " Has a value of " & ctrlToCheck.Text
      End If
    End If
  Next
Next

This will scan all forms for all textboxes and print the name and value, you can then store this information wherever you like.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7140456
TimCottee,

You have a typo:
For Each txtToCheck In frmToScan.Controls

should be
For Each ctrlToCheck In frmToScan.Controls
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7140477
Thanks aikimark, always the same when you just type a response without testing it out.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 45

Expert Comment

by:aikimark
ID: 7140507
TimCottee,

Glad I could help.  You were up awfully early answering questions.  I guess the early bird really does get the (points) worm.  Glad I could help.  It's happened to me as well.

====================================================
vjey,

Points to TimCottee.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7140511
Not so early here in the UK
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7140536
Hey!  That's not fair.  You're cheating. :-)
(only kidding)
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7140557
I know the feeling though, especially when I start off in the morning and all the juicy questions have already been pretty much answered by those on the other side of the world. I have to wait a little while usually until the east coast comes on-line as the bulk of questions still come from north america.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7140582
We are a clueless lot, aren't we?

Your advantage is that you've had enough liquid caffeine that you are fully alert by the time the east coast starts asking questions.  Us east coast experts are working in a fog initially.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002184
West Coast volunteers are in a continual fog....
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002185
Hi vjey,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept TimCottee's comment(s) as an answer.

vjey, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 8094199
Comment from expert accepted as answer

Computer101
E-E Admin
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question