Hi. What data type do I need to represent a negative percentage? Everything I have tried returns an error or zero. Here's a simple example of what I want:
declare @a int
declare @b int
declare @c numeric(15,2)
select @a = 1450
select @b = 1650
Select @c = ((@a - @b)/@b) * 100
print @c
Scratch the last post. Code works fine. I have spent several hours on this, and the whole problem was I wasn't grabbing the input params correctly from VB! D'oh.
I am running a stored procedure from VB with ADO to SQL Server 7, and returning some output parameters. The proc runs fine from the query analyzer and returns values, but no matter what I try, I only get a value of NULL for my output params in VB. Help, please??
Here's some slightly cleaned up...
I am returning multiple recordsets from a SQL stored procedure, and using the ADO NextRecordset method to retrieve all of them into my VB app. Does anyone know if there are any problems created by passing too many recordsets back this way?? I am passing 7 recordsets back from one proc (I'm...
Schmendrick...Have you checked the results of your query before it goes into the report? Maybe everything is coming up twice in the query because of your join condition.
Thanks for your input CClint. The problem is, I want to take an existing report, pull it's name from the database, and get a handle to it. No matter what I try, I can't get a handle to it, using its name in a variable.
So if the reportname is passed from the db to a variable, say sReportName...
That's exactly what I'm trying to do, but in a VB/SQL Server app, not Access. I wanted to be able to generate multiple reports from a single routine, instead of having to write a unique routine for every report. I have figured out a workaround, but it still does not allow me to pull the name of...
Does anyone know if there is a way to dynamically assign the name of a data report at runtime. I want to have a generic procedure to populate multiple reports at run time. But when I try to dynamically assign the name of the report I get errors.
Set rptReport = sReportName gives me an...
Thanks. That is interesting stuff. It does seem to deal with layout, rather than font, but it's certainly worth a shot. I tried working with it a little, and it seems to break the site in Netscape 4 (part of our spec is to be compliant with version 4+ browsers). Unfortunately too, I don't have...
It almost never happens. I only know of this one person having the problem. He sent me a screen shot so I've seen that all of the text is garbled. It happened to me a couple of months ago in one text box, but the problem disappeared.
I have a website with all the content in DIV tags using CSS absolute positioning. On most computers and browsers (IE 5.5, IE 6, Netscape 5+) everything is fine. But on one person's computer using IE 5.5, all of the text appears as junk symbols - squares and other symbols. The Font-family in the...
I have used the form.tag property to identify what mode a form is in. You could set that tag based on the global suggested above, and enable/disable form features based on the tag setting.
CajunCenturion,
Thanks for your input. In fact, that code was only to validate the 0th control, and I do check the index as you suggest. I had simplified the code for posting to the forum. Thanks for clarifying what the Cancel parameter is doing. Any guesses as to why the code does not leave the...
I have a masked edit box on a different form. There the code does not work.
Private Sub medDrvr_Validate(index As Integer, Cancel As Boolean)
If Not IsNumeric(medDrvr(4)) Then
Cancel = True
MsgBox "You must enter a valid number."
End If
End Sub
This fails to send...
Well, I have a control array, so there is an Index parameter passed to the sub. But I had not noticed that there was a Cancel paramter too. Based on CajunCenturion's suggestion I set the Cancel to True, and that succeeds at keeping the focus.
Private Sub txtDSA_Validate(index As Integer, Cancel...
Hi everyone. I have been unable to set the focus back to a control (i.e., textbox) after validating. Once the textbox fails the validation event, I pop an error message, but then I can't seem to set the focus back there. Any help is appreciated.
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.