How do I make using code vba to catch the (amount of entrance - amount of
exit) / sum (entrance values - exit values) of a certain product?
I make that using a query, but I don't know as doing using vba.
but the one that I am not getting is to recover those values.
(amount of entrance - amount of exit) / sum (entrance values -
dsum ("amount of entrance","tbl","product = number and movimento = "e")
dsum ("amount of exit","tbl","product = number and movimento = "s")
"Fredg" <fgutkindatt.net> escreveu na mensagem
> To count the number of words in a field, count the number of spaces andtext> 1. This assumes there are no double spaces within the field.
> Add the following function to a module:
> Public Function CountWords(InText as String) as Integer
> ' Count the number of words in a field.
> Dim intX As Integer
> Dim intY As Integer
> Dim intCount As Integer
> intX = InStr(1, InText, Chr(32))
> Do While intX <> 0
> intCount = intCount + 1
> intY = intX + 1
> intX = InStr(intY, InText, Chr(32))
> CountWords = intCount + 1
> End Function
> You can call the function from a query:
> Add criteria and/or error handling to test for Null records.
> Please reply only to this newsgroup.
> I do not reply to personal e-mail.
> "Frank Dulk" <fdulkbol.com.br> wrote in message
> news:uqZ6hmSVDHA.1832TK2MSFTNGP09.phx.gbl...> >
> > do I have a sentence in a text box called txtnome, how to count this>> > box's words that are separate for space??