473,325 Members | 2,805 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,325 software developers and data experts.

inserting records for multiple times and days

I am trying to create a form for a patient diary. The form is set up so
that information is entered for morning, afternoon and evening for day 1
to 7. Ideally, I would like to set up the form almost like a spreadsheet
such that the user can navigate through the form without having to enter
the specific time info for each new record. I'm thinking that I should
set up some sort of nested loop that would run through morning,
afternoon and evening for day 1 to 7 and have that information entered
automatically for each new record, but I'm not sure how to pull this off.

Any suggestions/advice, including alternative strategies?

Thanks,

Eric
Nov 13 '05 #1
2 1074

Eric Bacon wrote:
I am trying to create a form for a patient diary. The form is set up so that information is entered for morning, afternoon and evening for day 1 to 7. Ideally, I would like to set up the form almost like a spreadsheet such that the user can navigate through the form without having to enter the specific time info for each new record. I'm thinking that I should set up some sort of nested loop that would run through morning,
afternoon and evening for day 1 to 7 and have that information entered automatically for each new record, but I'm not sure how to pull this off.
Any suggestions/advice, including alternative strategies?

Thanks,

Eric


How do I put this delicately? how good are your coding skills?
Creating a loop that does this is a walk in the park. doing all this
in Outlook is even easier - no code required. The spreadsheet look.
You could grab the code from Developer's Handbook, but unless you know
a fair amount about Access, it'll go right over your head. (It did
when I tried that...)

for intcounter = 0 to 6
'Calc date
dtTemp=Dateadd("d",somedate,intcounter)
rs.Addnew
rs.fields("DateDue")=dtTemp
rs.fields("PatientID")=Me.patientID
rs.update
next intCounter

Hope that points you in the right direction....

Nov 13 '05 #2
That does point me in the right direction - thanks. As you have guessed,
I'm a novice Access user so even though I know what I want to do and
even have some idea how to accomplish it I don't always know the syntax.
I've been meaning to figure out recordsets for some time now and this
seems like a good enough place to start.

Cheers,

Eric

pi********@hotmail.com wrote:

How do I put this delicately? how good are your coding skills?
Creating a loop that does this is a walk in the park. doing all this
in Outlook is even easier - no code required. The spreadsheet look.
You could grab the code from Developer's Handbook, but unless you know
a fair amount about Access, it'll go right over your head. (It did
when I tried that...)

for intcounter = 0 to 6
'Calc date
dtTemp=Dateadd("d",somedate,intcounter)
rs.Addnew
rs.fields("DateDue")=dtTemp
rs.fields("PatientID")=Me.patientID
rs.update
next intCounter

Hope that points you in the right direction....

Nov 13 '05 #3

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

Similar topics

5
by: Vishal Sinha | last post by:
Here is my issue. I have a list of merchants (generated daily) and I need to assign them eually to a set of analysts. Both the merchant list and analyst list can change daily. I want to assign each...
2
by: Alpha | last post by:
I have a C# program that user would select several search criteria and then outputs to the Crystal Report. A message is output to user if no matching record is found. In my code I also clear,...
10
by: Roger Withnell | last post by:
I'm using ASP, VBScript and SQL Server. I'm also using UTF-8 character set and so my codepage is 65001 and SQL Server datatype nvarchar. I can insert unicode characters correctly into the...
6
by: planetthoughtful | last post by:
Hi All, I have a C# ASP.NET page that submits back to itself to insert details from a form into a database table. When / if the user refreshes the page (and gets the standard warning that POST...
9
by: Mohd Al Junaibi | last post by:
Hello all, my first post here...hope it goes well. I'm currently working on stored procedure where I translated some reporting language into T-SQL The logic: I have a group of tables...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
7
by: ebindia0041 | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, Asp.net 1.1 with c# I'm inserting simple records into a table. But one...
22
by: kjworm | last post by:
Greetings everyone, I am working on a scheduling tool and have a temp table that I am attempting to loop through to pull the necessary info out of before deleting. I am using Access '97 on...
2
by: AlexanderDeLarge | last post by:
Hi! I got a problem that's driving me crazy and I'm desperately in need of help. I'll explain my scenario: I'm doing a database driven site for a band, I got these tables for their discography...
3
by: simple simon | last post by:
How would I insert into multiple related tables using a table valued parameter? Is there any way to do this without using a WHILE loop? I know how to insert from a table valued parameter into one...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.