Solved

Creation of wordpad

Posted on 2001-07-13
5
346 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
5 Comments
 
LVL 20

Expert Comment

by:hes
ID: 6280741
0
 
LVL 3

Accepted Solution

by:
gajendra earned 45 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now