sure but some functions may not work... i'll do it now :)
Populating a schedule from my data and appending it to a table
Collapse
X
-
-
Comment
-
You had a couple of problems primarily with the List Box and the Requerying of it. There also appeared to be errant code in some of the Modules, but you should be OK now. Good Luck.Attached FilesComment
-
Its all great except some dates still come the wrong way round on some records!!! ahha. Everything else is awesome, though dude!! Serious thanks!!! I duno what i can do about the date thing! xComment
-
- Remove any Formatting from the [Date] Field in tblResults.
- Change Code Line #10 in fPopulateSchedu le() as indicated below:
Code:'...Code intentionally omitted 'Populate tblResults with the Cycle, Day in Cycle, and Random Days in Cycle For intCycleCounter = 1 To bytNumOfCycles For intDaysInCycleCtr = 1 To bytDaysInCycle For intArrayCtr = LBound(varRandoms) To UBound(varRandoms) 'Does the Day in the Cycle equal the Random Date? If intDaysInCycleCtr = varRandoms(intArrayCtr) Then CurrentDb.Execute "INSERT INTO tblResults ([Cycle], [Day], [Date], [Patient], [ChmoPackageID], [Regimen]) VALUES (" & _ intCycleCounter & ", " & intDaysInCycleCtr & ", #" & _ Format(DateAdd("d", intOverallDayCtr, dteDate), "mm/dd/yyyy") & "#, '" & strCustomer & _ "', " & lngPackageID & ", '" & strQuickName & "');", dbFailOnError End If Next Debug.Print Format(DateAdd("d", intOverallDayCtr, dteDate), "dd/mm/yyyy") intOverallDayCtr = intOverallDayCtr + 1 Next Next '...Code intentionally omitted
- All Results will be correctly displayed but in the dd/mm/yyyy Format as opposed to mm/dd/yyyy.
- A query can always Re-Format the [Date] Field if you so desire, and also be the RowSource for the list Box, as in:
Code:SELECT tblResults.Cycle, tblResults.Day, Format(tblResults.Date, "dd/mm/yyyy") As FDate, tblResults.Patient, tblResults.ChmoPackageID, tblResults.Regimen FROM tblResults;
- See Attachment below for Date Problem Correction:
Attached FilesComment
-
Wow - amazingggg - all works great!! Thank you so much you're a genius!!
Stay tuned... more difficult questions on the way!!!Comment
-
Glad to help you - how about giving me a break before any more difficult questions? (LOL). This Thread was really a challenge, but we pulled through.Comment
-
lol u can have a break.... i realli appreciate it!!!
Only one thing i wish i'd have asked for is that that another field is added and it increments like so....
for example - Cycle Day [New Field]
1 1 A
1 8 B
1 15 C
2 1 A
2 8 B
2 15 C
Haha when you fancy a challenge next!!Comment
-
lol u can have a break.... i realli appreciate it!!!
Only one thing i wish i'd have asked for is that that another field is added and it increments like so....
for example - Cycle Day [New Field]
1 1 A
1 8 B
1 15 C
2 1 A
2 8 B
2 15 C
Haha when you fancy a challenge next!!
P.S. - I now consider this Thread closed.Attached FilesComment
Comment