473,763 Members | 7,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding a day to the day mentioned in the last record

I made this table in which we registrate our working hours

It is in fact quite simple:

DayOfTheWeek Date StartTime Endtime Lunch Travel ... ... ... Total
WorktimeThisDay

This would look like:

Tuesday 01-01-04 ... ... ...

Now I want the next record automatically be filled with the next day and
date

e.g.

Id1 Tuesday 01-01-04 ... ... ...
Id2 Wednesay 02-01-04 ... ... ...
Id3 Thursday 03-01-04 ... ... ...

This way I want to fill the table for the whole year 2004:

Id1 Tuesday 01-01-04 ... ... ...
....
....
....
Idx Friday 31-12-04 ... ... ...

From this data I can then generate Weekreports and Monthly reports

Any clue as to how to fill the records with the dates 01-01-04 <=> 31-12-04
without having to type it all in?

TIA,

Henro
Nov 12 '05 #1
3 1657
On Thu, 20 Nov 2003 15:01:55 +0100, "Henro V"
<ma**********@h otmail.com> wrote:

Write a few lines of code. Open a recordset on that table
(OpenRecordset) , call the AddNew method to add a new record, fill the
fields with values, and save the record (.Update). Do this in a loop,
and voila: 365 rows in less than 5 seconds.

Use DateAdd to increment your date value by one for each iteration.

-Tom.

I made this table in which we registrate our working hours

It is in fact quite simple:

DayOfTheWeek Date StartTime Endtime Lunch Travel ... ... ... Total
WorktimeThisDa y

This would look like:

Tuesday 01-01-04 ... ... ...

Now I want the next record automatically be filled with the next day and
date

e.g.

Id1 Tuesday 01-01-04 ... ... ...
Id2 Wednesay 02-01-04 ... ... ...
Id3 Thursday 03-01-04 ... ... ...

This way I want to fill the table for the whole year 2004:

Id1 Tuesday 01-01-04 ... ... ...
...
...
...
Idx Friday 31-12-04 ... ... ...

From this data I can then generate Weekreports and Monthly reports

Any clue as to how to fill the records with the dates 01-01-04 <=> 31-12-04
without having to type it all in?

TIA,

Henro


Nov 12 '05 #2
Dear Tom, since I am a complete newbie if it comes to code, I understand
what yuou are saying but I havent got'a ckue how to do this. Could you post
an example?

TIA Henro
"Tom van Stiphout" <to*****@no.spa m.cox.net> wrote in message
news:8e******** *************** *********@4ax.c om...
On Thu, 20 Nov 2003 15:01:55 +0100, "Henro V"
<ma**********@h otmail.com> wrote:

Write a few lines of code. Open a recordset on that table
(OpenRecordset) , call the AddNew method to add a new record, fill the
fields with values, and save the record (.Update). Do this in a loop,
and voila: 365 rows in less than 5 seconds.

Use DateAdd to increment your date value by one for each iteration.

-Tom.

I made this table in which we registrate our working hours

It is in fact quite simple:

DayOfTheWeek Date StartTime Endtime Lunch Travel ... ... ... Total
WorktimeThisDa y

This would look like:

Tuesday 01-01-04 ... ... ...

Now I want the next record automatically be filled with the next day and
date

e.g.

Id1 Tuesday 01-01-04 ... ... ...
Id2 Wednesay 02-01-04 ... ... ...
Id3 Thursday 03-01-04 ... ... ...

This way I want to fill the table for the whole year 2004:

Id1 Tuesday 01-01-04 ... ... ...
...
...
...
Idx Friday 31-12-04 ... ... ...

From this data I can then generate Weekreports and Monthly reports

Any clue as to how to fill the records with the dates 01-01-04 <=> 31-12-04without having to type it all in?

TIA,

Henro

Nov 12 '05 #3
On Thu, 20 Nov 2003 15:24:51 +0100, "Henro V"
<ma**********@h otmail.com> wrote:

If you.re not a programmer, here is an alternative: Excel has this
Autofill feature where if you enter 1/1/03 in A1 and 1/2/03 in A2,
select both cells and drag down, it will fill the new cells with
1/3/03, etc. Use this technique to prepare your table. Then import
this into Access.

-Tom.
Dear Tom, since I am a complete newbie if it comes to code, I understand
what yuou are saying but I havent got'a ckue how to do this. Could you post
an example?

TIA Henro
"Tom van Stiphout" <to*****@no.spa m.cox.net> wrote in message
news:8e******* *************** **********@4ax. com...
On Thu, 20 Nov 2003 15:01:55 +0100, "Henro V"
<ma**********@h otmail.com> wrote:

Write a few lines of code. Open a recordset on that table
(OpenRecordset) , call the AddNew method to add a new record, fill the
fields with values, and save the record (.Update). Do this in a loop,
and voila: 365 rows in less than 5 seconds.

Use DateAdd to increment your date value by one for each iteration.

-Tom.

>I made this table in which we registrate our working hours
>
>It is in fact quite simple:
>
>DayOfTheWeek Date StartTime Endtime Lunch Travel ... ... ... Total
>WorktimeThisDa y
>
>This would look like:
>
>Tuesday 01-01-04 ... ... ...
>
>Now I want the next record automatically be filled with the next day and
>date
>
>e.g.
>
>Id1 Tuesday 01-01-04 ... ... ...
>Id2 Wednesay 02-01-04 ... ... ...
>Id3 Thursday 03-01-04 ... ... ...
>
>This way I want to fill the table for the whole year 2004:
>
>Id1 Tuesday 01-01-04 ... ... ...
>...
>...
>...
>Idx Friday 31-12-04 ... ... ...
>
>From this data I can then generate Weekreports and Monthly reports
>
>Any clue as to how to fill the records with the dates 01-01-04 <=>31-12-04 >without having to type it all in?
>
>TIA,
>
>Henro
>


Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3076
by: 6thirty | last post by:
Hi, I've created a stocktaking database using Access XP. This is indexed by two fields - part number and shelf location. I am currently inputting all the data via a form. When I have entered a record such as: part number 202354-001 location C1-01
3
2123
by: MS | last post by:
What's the best way to "store" and display a value in a text box that changes from day to day. An example of this would be where the name of the user is manually typed in after using the datbase, along with (say) the date. ATM, I have a table with (say) 4 fields. Each field is linked to a column in a combo box. The combo box is invisible on the form. The text boxes display previous data using code something like this... Private Sub...
2
10004
by: Jim | last post by:
In my Win App, I have a datagrid that's bound to a dataset. When the form loads, the datagrid fills. How can I add an empty row to the end of the datagrid during a button click (similar to pressing Tab when mouse pointer is on last field of last record of datagrid)? The datagrid's read-only so the user won't be able to modify it unless he wants to add a new record via the datagrid (by adding the empty row). Also, if I modify the...
3
4885
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that the best method? Do you have a sample of how to do this?
9
424
by: Greg | last post by:
Binding Manager & dataset - won't add record I've got an untyped dataset with controls bound through code. The user can select a question number from a bound combobox, and the question number and question text are displayed in bound textboxes. This part works fine. When I go to add a new record, the textboxes clear as they should. I enter a new question number and tab to the textbox for the question text. At this point, the text for the...
1
1127
by: Nkagi | last post by:
Hi All, I have a problem of adding records into table, if the cursor is on the first record the record that I add replaces the first record and then I moved it to the last record and the new record replaces that last record in the table. Is there a method that I can use to make sure this doesn't happen. The thing is my program was working fine until recently, as I have about 197 records in that table. Can someone please rescue me. this...
3
5350
by: john | last post by:
In my form (table A) I have subform (table B (only 2 fieds: ID and App_name) where table A -Table B are linked 1XM. To be able to add a record in the subform I want to use a lookup form since the number of possible values is over 300. For data consistancy I've locked the subform so that the user can't add or change values manually without using the lookup form. My question is: What's the best way of adding the record to table B which the...
1
1464
by: raaaz | last post by:
Hi dears, I am adding a record in Access database using AddNew method of recordset. here is the code of the page .. <% Set RsLibBuild = Server.CreateObject ("ADODB.Recordset") RsLibBuild.ActiveConnection = conn RsLibBuild.LockType = 2 RsLibBuild.CursorType = 1 RsLibBuild.Open "select * from tblbuilding where building_name='" & request.Form ("buildingname") & "' and area_name='" & request.Form ("areaname") & "' and...
2
2107
by: abhimanyu singh | last post by:
i m facing a serious probs now a days............ its seems easy but for me i found it difficult......... i want to do transformation usig xsl and xml(adding parameter). for IE its working fine but for other browser like-firefox,opera its not working......... i m giving u my complete xml,xsl and transformation code....u only paste and check why it is not working for other browser.....and correct it and let me know......this is really a big...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.