o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

IIF returning nothing -

For some reason, on this report IIF isn't working.

The report has a date grouping, under that date grouping (Not the detail section) I have Date, and then txtboxes with this IIF statement in them. The first one is coming up with values, all of the others are not.

=iif([AdjReasonCode]="Courtesy Credit - Local",Credit,Null)


This works though?

=-Sum([credit]*([adjreasoncode]="Courtesy Credit - Local"))

is it because iif only evaluates the first item? Where as Sum in this instance is going through all the data for that day, and because of the * by false (0) it is getting all the data? Am I understanding this correctly?

i'm gonna use the SUM, same code I used for another report given to me by Anhn. (thnx anhn, giving credit where credit is due)

 

GetForegroundWindow() -- Megatron Help -
I am using GetForegroundWindow to check if a form has focus and if not unload. The problem is that it keeps returning 0 after I click on the system tray icon that shows the form. Does anyone know why is would keep returning 0? BTW, I have tried setting focus to it and everything l


Return multiple arrays from a function -
I found plenty of topics on returning an array.. simple enough. I can't find anything on returning multiple arrays though. I have a function that receives a string and parses it into 3 different arrays. Problem is I have no way of returning them back without making them global (ic


Returning Procedure Name -
Does anyone know a way of returning the current "Procedure Name" and "Module Name" in a VB6 program. I am writing an error handler - and returning these details would save having to pass them into the routine manually... Surely there must be an API call or som


API Screen Resolution Call -
I am following the example from this page to retrieve the Screen Resolution using the API call: GetSystemMetrics. It is returning the X screen value in both variables. Here is my code: ScrnResX = GetSystemMetrics(SM_CXSCREEN) & "X" & _ GetSystemMetrics(SM_CYSCREEN)


[2005] Returning SQLCOMMAND results to a string -
I have a function that will be returning my list of customers it gets from a SQL table. But instead of just returning the results of the query in its native sql format, I need it to return them as a string, with each result after the other with a comma in the middle, like this: Custom


Query Return Progress/Cancel Query -
How can I ... 1. Retrun the Query Progress from an ADO Object. Surely if I am returning a vast amount of data, how does it know how much needs to be returned? 2. Cancel an active returning query. 3. Return chunks of data. If I am returning 100,000 records,


restoring defaults -
Is there any event that happens when returning to a form from another? the problem i have is that after making changes in a settings form and returning to the main form you need to click a command button to reload the settings from a txt file. I want this to happen automatically when


PROBLEM:Returning All Tables -
Hi Guys How would I go about Returning all the tables from a Database I've been trying and cant get it to work. Please help. Thanks


Function returns -
Hi is there any difference between returning a value from a function in the two ways below: return x Or [Functionname] = x Both seem to work but some code that uses the function works with one and not with the other. Also is there any way of returning by ref or by val sp


[2005] How to call a bin file, and keep the returning value -
I'm working in vb2005 and I have to call a bin file with an parameter and find out the returning value.. Does anyone know how to solve this problem? thanks for your time...


Returning a Recordset -
I've read a few threads on returning a recordset from a stored procedure (called form a vb client) -- as I am searching how this might be done. A little background, which will likely fire off some replies right off. On the vb client side, I am using data environments to connect t


@@identity in access -
is there a quick and easy way of returning the primary key after an insert into an access database? Along the lines of an SQL server SP returning @@identity?


What does Randomize exactly do -
And where should it be used? in form_load? in a sub? how can you 'reset' a randomize statement during runtime? one of my subs is supposed to be returning a random value but it keeps returning the same one if it is called many times and i dont know why


Returning value from Exe -
Hi, Thanks for reading. I want a VB exe which should return a value say some success or failure regarding the operation happening inside it. Just like a C++ program returning a value to the console. And I want my java program to read this. How can I return the value from my VB progr


Returning Image Files through asp -
MSDN discusses this topic and shows how we can return an Image file from disk or database through an asp page. I was wondering if it was possible to specify the file name while returning the file. Is that possible?


GetShortPathName API & XP -
We are running into a problem using the GetShortPathName API on Windows XP. If the path we are attempting to shorten has a "." within the first six charachters, the API is returning junk instead of the correct shortened path. By junk I mean if we send in "c.locker"


Output Parameter -
I've seen in an article that using Output parameters is much faster in performance than returning a recorset if you are returning single value or row of data. Any example code on how to create output parameter in a stored procedure that returns for example account,telno and address


A doubt in VB and ASP -
Hi, I have a doubt. In Web-pages, Which is a better method of the following to return values using VB components. 1. Returning values as Arrays. or 2. Returning values as Recordsets. and if possible please do let me know the reason why one between the two is bette


click event not returning infomation -
when i run the roject it show the info in the first box but when i click ok the info it is soposed to load the same record set into text box on orther form but returning a no record the database is access and vb is the frount end


which API -
new 2 VB and started API few weeks ago. i tried to get this info i'll get from windows registry-the registered owner(my full name) and registered organization(my pet company) using API but getcomputer...is returning my computer name and getuser... is returning my ID for my windows 98


problems returning oraclenumber value to any vb.net datatype -
hi, im having a bit of a problem retrieving a number from a field in a table from my oracle database. it seems that vb.net wont accept OracleNumber datatype... is there any solution to this??? im using oraclecommand to retrieve a single value from a sequence in my database unf


SQL Helper Inserting records and returning the ID -
Hi all ive just started using the SQLHelper and am in need of inserting a record and returning the @@identity im using the transaction method but it does not return anything "its not ment to" reading the help file it got members and one of them is ExecuteReaderTyped


WeekDay Problem -
Hi Guys, I am using this code; Response.Write(WeekDayName(WeekDay(now()))) For some reason, this code keeps returning the wrong day. It gives me the day after. For example, at the moment it is Sunday and the code is returning Monday. The date, time and timezone on the serve


How to retrieve a value from a listbox. -
Normal listbox. Why isn't this returning the text lst_SiteID.ItemData(lst_SiteID.ListIndex) It is returning the listindex.


SELECT CASE for different data types -
Hello, Is it possible to return values of different data types in SELECT CASE .. WHEN clause? I was asked this question in an interview and my answer was No, because we cannot return values belonging to different data types. e.g., in a table you have 2 columns, named Dept., whic


Distinct query -
I have a table where I want a distinct value from one col and the matching data as well. <code> select distinct (titlekey), testkey from tableone </code> This is returning distinct testkey, not the titlekey, returning 100K records not the 135 I am expecting. How am


REturning a form VAlue with VBscript -
Hi all, Writing a program at the mo and need to see if a form has been submitted. specifically, if a button has been presed b y returning the value of it, if it does not, hte code does not exxecute. Know pretty much all of the code neeed, but not sure how to write this. Please


return types -
Object Object::Foo(); vs Object& Object:Foo() What is the difference between returning and object and returning a reference to the object? If there is a difference, when would you use each case?


Best way to store table data and use them -
VB.NET 2005 Till now i'm having this in excel but it's time to move on I have ~25 tables in excel sheet like this: Table01 ----10--30--50--100--etc... 10---5---6---8---9 20--10--15--17--20 30--17--23--30--42 40--35--41--52--75 etc... Table02 -----A---B---C--D--etc...


Functions returning two values -
Hi! Is it possible to make a user-defined function return two values? How do i do it? Wat i understand about returning values is this: Public function myfunction(parameter) as integer myfunction="resulting value" end function Private Sub Command1_Click() retu


[2005] Returning an empty report with Crystal Reports -
Hello! I just started to learn Crystal Reports. My data source is a view and the value I want to filter from the view was inserted in the table at runtime. Am I able to do this? Is the view filled at the runtime also? The report is returning empty. Thank you. Ana Bastos


you will not receive any more notifications until you visit the forum again -
I was wondering if there is a setup switch that could be changed such that it would be based on returning to the thread vrs returning to the forum? ie... "you will not receive any more notifications until you visit the THREAD again" -Just curious -Lou


Finding .Top & .Left Values -
I tried to find the paramaters (values) of Image3.Top and Image3.Left, but whenever I go: MsgBox Image3.Top and the same for Image3.Left, It keeps returning zeroes, but for width and height it's returning me the proper values. How can I find out the right parameters?


[2008] returning field from an excel workbook -
Hello, I need my program to be able to look through an excel workbook and return the data in a particular field. My work book has multiple sheets relating to different products. I want to search by the item code of the product then return the list price of the product. I have


query returning null instead of 0 -
I have a query which is returning null value instead of 0. Is there a way out of this ? the query is SELECT (select COUNT(SEX) from A,B where A.ssn=B.ssn and sex='M' and CC='X') AS Count1, (select COUNT(SEX) from A,B where A.ssn=B.ssn and sex='M' and CC='Y') AS Count2 From A, B WHE


@@identity not returning any value [resolved] -
Can any one see what's wrong with this? I'm calling it from an asp page. It's inserting the value but not returning anything in the recordset...... Code: CREATE PROCEDURE spVan_Start AS insert into tblVan_counter (q1) values (1) select @@identity GO


Incorrect result from query -
Hi All, I am having a problem with this piece of code, it is not returning the correct result. It should be returning a count of around 700. Instead it is returning a count of -1, can anyone see where I have gone wrong? Dim cn142i As Connection Dim strSQL As String


I don't quite understand return types! -
Hello everyone, schools out once again and i'm going to attempt to learn C++, again. Anyways, The main problem i have is when i get to reading some code, and i see somthing like this: Code: const Counter& Counter::operator++() { ++itsVal; return


SetWindowLong is returning null -
I am using the api function SetWindowLong in VC++ inside a dll. I'm trying to subclass external program by issuing the SetWindowLong inside a dll(I'm not sure if that would work.) I went into debug mode and I know for a fact that the parameters that its taking in are not null. But f


Returning a Recordset from a Stored Procedure -
I tried this in the db forum with no joy. I am writing a VB component that takes a userid as input and passes it into an Oracle stored procedure, this returns a recordset of data. I have successfully got the code to work in ASP but I'm dammed if it works in VB. I have tried many