?
Solved

Creation of wordpad

Posted on 2001-07-13
5
Medium Priority
?
377 Views
Last Modified: 2008-03-17
I am having two queries related to V.B6.0

1)I am creating my own Wordpad in VB.I want to add the Ruler in my wordpad as it is there in original
wordpad but i dont find any ruler control in components option in VB. How do I put that control in my
wordpad.

2)Secondly I have created a datatreport in VB now i want that before executing the datareport it should
first flash the screen asking me about the department no. for which i want to execute the report.I have
created a form in std.exe ehich ask me about deptno but now i dont know how to send this deptno to dataenvironment
and how to execute datareoprt for that particular dept.Kindly send me the code for this.
0
Comment
Question by:meghana_as
[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
5 Comments
 
LVL 20

Expert Comment

by:hes
ID: 6280741
0
 
LVL 3

Accepted Solution

by:
gajendra earned 180 total points
ID: 6282033
Hi Meghna

For your query 1 you could create your own control or simply use the picture box and the line and print methods to achieve the ruler bar.

As for your query - I think you want to pass a parameterized to the query you are using in the data report.

IF yes - get a look at the PARAMETERS object in ADO or simply create a query string based on the parameter and use it in datareport at run-time.

Something like

mSql = "SELECT * FROM table WHERE deptno = '" & txtdeptno.text & "'"

assuming deptno is a text field. Make necessary changes to accomodate dates and numbers.
0
 
LVL 5

Expert Comment

by:KDivad
ID: 6282496
Instead of making your own form to get the dept number, you can use VB's InputBox function. Something like this:

Dim DN As String
DN = InputBox("Please Enter your dept number.")
If DN = "" Then
    'User canceled
Else
    'Send your query
End If

You can use something like gajendra's code (I guess, I don't know about the data components) but pass DN instead of txtdeptno.text.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7153093
Hi meghana_as,
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:

    Split points between: hes and gajendra

meghana_as, 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 5

Expert Comment

by:Netminder
ID: 7182162
Per recommendation, force-accepted.

Netminder
CS Moderator

hes: points for you at http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20328909
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
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.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 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