Solved

report problem

Posted on 2002-07-09
11
139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

752 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