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

report problem

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
vjey
Asked:
vjey
  • 4
  • 4
  • 2
  • +1
1 Solution
 
TimCotteeCommented:
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
 
aikimarkCommented:
TimCottee,

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

should be
For Each ctrlToCheck In frmToScan.Controls
0
 
TimCotteeCommented:
Thanks aikimark, always the same when you just type a response without testing it out.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
aikimarkCommented:
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
 
TimCotteeCommented:
Not so early here in the UK
0
 
aikimarkCommented:
Hey!  That's not fair.  You're cheating. :-)
(only kidding)
0
 
TimCotteeCommented:
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
 
aikimarkCommented:
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
 
DanRollinsCommented:
West Coast volunteers are in a continual fog....
0
 
DanRollinsCommented:
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
 
Computer101Commented:
Comment from expert accepted as answer

Computer101
E-E Admin
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now