I have a form that has many controls on it. How, at runtime, can I work out which of the controls on the form is currently in focus? All help appreciated.
To see a very basic example of this, create a new exe and put a combo on form1. Then chuck this code behind the form and run it. It may do what you need it to do. If it does then happy days.
Private Sub Combo1_Change()
Combo1.ToolTipText = Combo1.Text
End Sub
Private Sub Combo1_Click()...
How do you test that a crystal report (that is embedded in vb) has been successfully printed using the 'ptintout' method? To my knowledge it does not return a value to indicate if it was succesful or not. I have many users printing from a network printer and ,upon printing, a message box...
Always use stored procedures over the SQL designer. Stored procedures are very often executed on a server and therefore the SQL will run more quickly here than if it were placed in the designer. Another advantage of using the stored procedure method is that if your report changes for whatever...
validate the input data. It is the easiest way in the long run. You don't want users typing in any old rubbish. Be aware that if you let garbage in the chances are garbage will come back out. Validate the data!!!!!!!
That is basically what I did in the end for want of a better solution. It seems very limiting to me that a value cannot be returned. This now means if any logic is altered in calculating this value I then have to alter the logic in two places rather than the one, which is poor for maintenance...
try using the isDate function. The function returns a boolean.
Something like this will help you:
If isDate(<someDate>) then
waffle...
waffle...
waffle...
end if
The SQL error is occuring because your syntax is wrong. Try this instead:
SELECT * from tblPolicyDetails A
WHERE EffectiveDate in(SELECT MAX(EffectiveDate) FROM tblPolicyDetails B
WHERE A.RiskID = B.RiskID)
I am running a Crystal Report from VB6 which produces a financial report. I wish to return the final grand total back from the report to VB and then stuff it in a variable. Is this possible? In other words, can Crystal return values. I am populating Crystal by linking it to a stored...
I am using VB6 to talk to exchange and do all the usual stuff such as setup appointments on calendars etc. Does anyone know if it is possible to obtain a list of all available profiles for a user, rather than having to input a profile name and then 'resolve' that name?
I am making the...
In the report file inself, i.e. the .rpt file, choose the option to 'Save Data With Report'. When you save the rpt file make sure that this option is chosen but also that no data is currently saved with it. Then from VB code simply save the report and the data will be saved with the report...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.