in Access I have a table called Leaves in which Jan, Feb, Mar....Dec and Jantotal, Febtotal, Martotal.......Dectotal are fields
now lets say field Jan contains some data like " 01,07,21,29,31 " etc which is the total leave taken in month January here the total is 5 now I need to calculate this automatically after entering it in the form and assign this value to Jantotal
how is that possible I tried to convert it to an array and assigned the length of array to Jantotal but its not working properly the variable I used is not changing from record to next record
please provide me a solution
3 1639
try this: - Dim intCount As Integer
-
-
' - use split function, placing each line into array as an item
-
JanTotal = Split("Jan",",")
-
intCount = Ubound(JanTotal)
Am I correct in that you simply want a count of the days entered, as you said, 5 for your example? If so a single line will also do it. - MonthTotal = Len([Month]) - Len(Replace([Month], ",", ""))+1
Welcome to Bytes!
Linq ;0)>
Am I correct in that you simply want a count of the days entered, as you said, 5 for your example? If so a single line will also do it. - MonthTotal = Len([Month]) - Len(Replace([Month], ",", ""))+1
Welcome to Bytes!
Linq ;0)>
thanx its working fine
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Madhusudan Singh |
last post by:
python-gpib provides Gpib.py (see end of post) for Linux.
I am trying to use the method called read. I usually use it without
arguments (the default length being 512). However, I am trying to...
|
by: Megan |
last post by:
Hi everybody-
I'm helping a friend with a music database. She has an old one and is
creating a new one. She wants to compare records and fields in the old
database with records and fields in the...
|
by: Theresa Hancock via AccessMonster.com |
last post by:
I have an Excel table I need to import into Access. The name is entered into one field "Name". I'd like to have two fields in Access, FirstName and LastName. How do I do this.
--
Message posted...
|
by: Herrcho |
last post by:
in K&R Chapter 6.3
it mentions two methods to calculate NKEYS.
and points out the first one which is to terminate the list of
initializers with a null pointer, then loop along keytab until the...
|
by: Miguel Dias Moura |
last post by:
Hello,
What I know:
To send a Value in the URL and filter the results in order to display
only the database records which FIELD_A = Value.
What I need to do:
I have a page with an Input...
| |
by: phillip.s.powell |
last post by:
Ok, you have three tables. You're supposed to be able to not only sort
(ORDER BY) according to a_name, no problem, but you must also have the
ability to sort (ORDER BY) the relationship between...
|
by: starman7 |
last post by:
I'm attempting a query that gathers product data for a particular
product id.
One of the items is designer(s) which can be more than one.
The product table has comma separated id's of the...
|
by: martin77 |
last post by:
Here is what I have for the code keep getting error on
'declare variables and assign address to object variables
Dim strId As String, strPayment As String, curPayment As Currency
...
|
by: H |
last post by:
Hi,
I have the following address fields in a table:
flat_number
house_name_or_number
street
village
postal_town
county
postcode
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |