Solved

report problem

Posted on 2002-07-09
11
140 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 46

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
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.

 
LVL 46

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 46

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 46

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses
Course of the Month3 days, 21 hours left to enroll

630 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