R
Rocky
I have an Append Quey that works fine when you right click on the
query ("ReaderIndCancelProforma_Append") and choose open
INSERT INTO Reader_DistrHistory ( DistrId, [Reader Id], [Date on
mailing list], TypeId, ReasonId, Reason, [Date off mailing list] )
SELECT Reader_DistrCurrent.DistrId, Reader_DistrCurrent.[Reader Id],
Reader_DistrCurrent.[Date on mailing list], 6 AS Type, 15 AS Reas,
[Forms]![Reader_CancelProforma]![Remarks] AS Remark, Now() AS off
FROM Reader_DistrCurrent
WHERE (((Reader_DistrCurrent.[Reader Id])=[Forms]![Reader_DB]![Reader
Id]));
The problem I have is when I run the query from a command button on a
form. It only appends the [Reader Id]
Private Sub Command8_Click()
On Error GoTo Command8_Click_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "ReaderIndCancelProforma_Append",
acViewNormal, acEdit 'this doesnt work
DoCmd.OpenQuery
"ReaderIndCancelProformaHistChange_Append", acViewNormal, acEdit 'this
works
DoCmd.OpenQuery "ReaderIndProFormaCancel_Delete",
acViewNormal, acEdit ' this works
DoCmd.OpenQuery "ReaderIndProformaCancel_Update",
acViewNormal, acEdit 'this works
DoCmd.SetWarnings True
Command8_Click_Exit:
Exit Sub
Command8_Click_Err:
MsgBox Error$
Resume Command8_Click_Exit
End Sub
Why should this suddenly happen. All the other queries work fine
I have other forms that run similar code and they all work fine.
Would appreciate some help on what the problem could be
Rocky Swartz.
query ("ReaderIndCancelProforma_Append") and choose open
INSERT INTO Reader_DistrHistory ( DistrId, [Reader Id], [Date on
mailing list], TypeId, ReasonId, Reason, [Date off mailing list] )
SELECT Reader_DistrCurrent.DistrId, Reader_DistrCurrent.[Reader Id],
Reader_DistrCurrent.[Date on mailing list], 6 AS Type, 15 AS Reas,
[Forms]![Reader_CancelProforma]![Remarks] AS Remark, Now() AS off
FROM Reader_DistrCurrent
WHERE (((Reader_DistrCurrent.[Reader Id])=[Forms]![Reader_DB]![Reader
Id]));
The problem I have is when I run the query from a command button on a
form. It only appends the [Reader Id]
Private Sub Command8_Click()
On Error GoTo Command8_Click_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "ReaderIndCancelProforma_Append",
acViewNormal, acEdit 'this doesnt work
DoCmd.OpenQuery
"ReaderIndCancelProformaHistChange_Append", acViewNormal, acEdit 'this
works
DoCmd.OpenQuery "ReaderIndProFormaCancel_Delete",
acViewNormal, acEdit ' this works
DoCmd.OpenQuery "ReaderIndProformaCancel_Update",
acViewNormal, acEdit 'this works
DoCmd.SetWarnings True
Command8_Click_Exit:
Exit Sub
Command8_Click_Err:
MsgBox Error$
Resume Command8_Click_Exit
End Sub
Why should this suddenly happen. All the other queries work fine
I have other forms that run similar code and they all work fine.
Would appreciate some help on what the problem could be
Rocky Swartz.