473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to enter blocks of data

64
Good afternoon.

I think I could think my way through this and waste days trying to figure it out but why not use this resource.

In access 2007 I have a time mangement database that basically is a timecard/data program. The techs all log there individual times through the program and it works fine. However, many of the admin types don't need to use work orders, ata codes, work codes etc, Just need to enter their time which is basically the same entry everyday.

Is there a method to enter blocks of time based on a date range where a user could enter a date range and the number of hours that should be posted to each date (assuming the number of hours is the same for each day)...and create an event that post the apprpriate time to each date within the date range? Therefore, using the program only once a week to enter his daily time for the week or date range.

I hope this is clear.

Thanks

Tomb
Aug 6 '08 #1
2 1277
janders468
112 Expert 100+
Hopefully I understood you correctly, the following code will do what you want, it assumes the coulumn names listed (Date and HoursWorked) and that the table is named HoursWorked_tbl. I am sure there are other fields you would want to add such as employee number etc. But I think this logic will get you there. Let me know if you have questions or if I misunderstood what you were asking. Also when passing arguments to this make sure to explicitly convert to date or wrap it in the hash (#) characters, otherwise something like 5/8/2008 will be interpreted as 5 divided by 8 divided by 2008 and then converted to a date, which is probably not what you want.

Expand|Select|Wrap|Line Numbers
  1. Sub EnterDateBlock(DateStart As Date, DateEnd As Date, HoursPerDay As Double)
  2.     Dim intCounter As Integer
  3.     For intCounter = 0 To cint(DateEnd - DateStart)
  4.         DoCmd.RunSQL "INSERT INTO HoursWorked_tbl ([Date], HoursWorked) SELECT #" & DateEnd - intCounter & "#, " & HoursPerDay & ";"
  5.     Next intCounter
  6. End Sub
  7.  
Aug 6 '08 #2
tbeers
64
you guys are so good.


Thanks much...........

Tomb
Aug 7 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: veera sekhar kota | last post by:
hi, im seriously looking for right answer .... We are developing windows application in c#. I implemented DAAB(Data Access Application Block) 2.0 in our application. One of the senior asked...
1
by: Stephen J. Shephard | last post by:
Hi there, I know this is probably a 101-type question, and I've dealt with it using client script blocks before, but I'm curious about what the best way to handle the enter key is.. (i.e., to...
29
by: John Rivers | last post by:
Hello, What good reason there is for not allowing methods in ASPX pages I can't imagine, but here is how to get around that limitation: (START) <body MS_POSITIONING="FlowLayout"> <form...
6
by: Clark Sann | last post by:
Can someone help me understand what object should be used as the lock object? I've seen some programs that use Monitor.Enter(Me). Then, in those same programs, they sometimes use another object. ...
3
by: craig | last post by:
I was just wondering if anyone else may have incorporated the original Microsoft Exception Management Application Block (EMAB) or Data Access Application Block (DAAB) into one of their applications...
3
by: guanfenglin | last post by:
Hi Guys, I have been reading practises and patterns on MSDN, there is one thing that I am not sure about... There are enterprise library and application blocks, does the latest enterprise...
2
by: Rajen | last post by:
Suppose the field length is 25 characters. After entering the 25th character, it should be available to process. Program should not wait for the user to press enter/return key. Thank you.
3
by: GaryDean | last post by:
I have just been through the docs on the Data Access Application blocks and it seems that they complicate things more than make things simple. To me it seems that there is nothing more simple and...
13
by: AliRezaGoogle | last post by:
Dear Members, I have a problem in the concepts of Monit.Enter and Monitor.Exit (Before everything I should say that I know how to solve this problem by using Monitor.Wait and I do not need a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.