Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Creation of wordpad

Posted on 2001-07-13
5
Medium Priority
?
383 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses

636 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