S
steamngn via AccessMonster.com
Hi All!
Is it possible to loop through records and pop up a window for additional
data, then insert the record? at present I have this:
Dim SQLStr As String
If MySelected2 <> "" Then
SQLStr = "INSERT INTO ATTENDANCE (ATT_HDR_ID,STUDENT_ID,EVENT_ID,LOCATION_ID,
EVENT_DAT,COMMENT,PHYSICAL_LIMITS,EVENT_FEE) SELECT " & Forms!ATTENDANCE_HDR.
ATT_HDR_ID & " as ATT_HDR_ID, STUDENTS.STUDENT_ID AS STUDENT_ID," & Forms!
ATTENDANCE_HDR.EVENT_ID & " as EVENT_ID," & Forms!ATTENDANCE_HDR.LOCATION_ID
& " AS LOCATION_ID,'" & Forms!ATTENDANCE_HDR.EVENT_DAT & "' as EVENT_DAT, '',
'',0 FROM STUDENTS WHERE STUDENT_ID IN (" & MySelected2 & ")"
DoCmd.SetWarnings False
DoCmd.RunSQL (SQLStr)
DoCmd.SetWarnings True
Set colCheckBox = Nothing
Me.Requery
Forms!ATTENDANCE_HDR!sfmstudentclasslist.Requery
End If
inserting records just fine. But some of our classes require fees, and I
would like to pop up a small form to add the amount (different for each
student) and then insert each record.
Yes? No? better ideas?
Thank you
Andy
Is it possible to loop through records and pop up a window for additional
data, then insert the record? at present I have this:
Dim SQLStr As String
If MySelected2 <> "" Then
SQLStr = "INSERT INTO ATTENDANCE (ATT_HDR_ID,STUDENT_ID,EVENT_ID,LOCATION_ID,
EVENT_DAT,COMMENT,PHYSICAL_LIMITS,EVENT_FEE) SELECT " & Forms!ATTENDANCE_HDR.
ATT_HDR_ID & " as ATT_HDR_ID, STUDENTS.STUDENT_ID AS STUDENT_ID," & Forms!
ATTENDANCE_HDR.EVENT_ID & " as EVENT_ID," & Forms!ATTENDANCE_HDR.LOCATION_ID
& " AS LOCATION_ID,'" & Forms!ATTENDANCE_HDR.EVENT_DAT & "' as EVENT_DAT, '',
'',0 FROM STUDENTS WHERE STUDENT_ID IN (" & MySelected2 & ")"
DoCmd.SetWarnings False
DoCmd.RunSQL (SQLStr)
DoCmd.SetWarnings True
Set colCheckBox = Nothing
Me.Requery
Forms!ATTENDANCE_HDR!sfmstudentclasslist.Requery
End If
inserting records just fine. But some of our classes require fees, and I
would like to pop up a small form to add the amount (different for each
student) and then insert each record.
Yes? No? better ideas?
Thank you
Andy