G
Guest
Im getting an error on the save statement below. It actually saves the first
2 statments in the table using the 'QueryAddStatusNextDate'. But it does not
add the 'QueryAddStatusReminderDate'. I don't know if it is because the
QueryAddStatusReminderDate is a update query and the 'QueryAddStatusNextDate'
is an append query.
Do have any suggestions why it is not saving the QueryAddStatusReminderDate
but is it saving the other?
Dim qdfRemindDate As DAO.QueryDef
Dim qdfStudyIdSSN As DAO.QueryDef
If Visit_Num.Value = 1 Then
Set qdfStudyIdSSN = CurrentDb.QueryDefs("QueryAddStatusNextDate")
qdfStudyIdSSN.Parameters("newId") = InterviewID
qdfStudyIdSSN.Parameters("newVisit") = 2 'schedule next interview
qdfStudyIdSSN.Parameters("newInterviewDate") = DateValue(Now())
qdfStudyIdSSN.Execute
Set qdfStudyIdSSN = CurrentDb.QueryDefs("QueryAddStatusNextDate")
qdfStudyIdSSN.Parameters("newId") = InterviewID
qdfStudyIdSSN.Parameters("newVisit") = 3 'schedule next interview
qdfStudyIdSSN.Parameters("newInterviewDate") = DateValue(Now())
qdfStudyIdSSN.Execute
'Add a new reminder calldate
Set qdfRemindDate =
CurrentDb.QueryDefs("QueryAddStatusReminderDate")
qdfRemindDate.Parameters("newId") = InterviewID
qdfRemindDate.Parameters("newVisit") = 1
qdfRemindDate.Parameters("newCallDate") = DateValue(Now())
qdfRemindDate.Execute
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
qdfStudyIdSSN.Close
qdfRemindDate.Close
2 statments in the table using the 'QueryAddStatusNextDate'. But it does not
add the 'QueryAddStatusReminderDate'. I don't know if it is because the
QueryAddStatusReminderDate is a update query and the 'QueryAddStatusNextDate'
is an append query.
Do have any suggestions why it is not saving the QueryAddStatusReminderDate
but is it saving the other?
Dim qdfRemindDate As DAO.QueryDef
Dim qdfStudyIdSSN As DAO.QueryDef
If Visit_Num.Value = 1 Then
Set qdfStudyIdSSN = CurrentDb.QueryDefs("QueryAddStatusNextDate")
qdfStudyIdSSN.Parameters("newId") = InterviewID
qdfStudyIdSSN.Parameters("newVisit") = 2 'schedule next interview
qdfStudyIdSSN.Parameters("newInterviewDate") = DateValue(Now())
qdfStudyIdSSN.Execute
Set qdfStudyIdSSN = CurrentDb.QueryDefs("QueryAddStatusNextDate")
qdfStudyIdSSN.Parameters("newId") = InterviewID
qdfStudyIdSSN.Parameters("newVisit") = 3 'schedule next interview
qdfStudyIdSSN.Parameters("newInterviewDate") = DateValue(Now())
qdfStudyIdSSN.Execute
'Add a new reminder calldate
Set qdfRemindDate =
CurrentDb.QueryDefs("QueryAddStatusReminderDate")
qdfRemindDate.Parameters("newId") = InterviewID
qdfRemindDate.Parameters("newVisit") = 1
qdfRemindDate.Parameters("newCallDate") = DateValue(Now())
qdfRemindDate.Execute
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
qdfStudyIdSSN.Close
qdfRemindDate.Close