Solved

Creation of wordpad

Posted on 2001-07-13
5
370 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

691 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