D
DoveArrow
I ran a series of update queries to update a table called
"PrimaryMajors." Now that the table is updated, I need to add
secondary degree notes to each non Associates Degree, but only if
there is more than one non Associates Degree.
To do this, I wrote the following sequence
'Add any 'Secondary Degree' notes from "tblCampusCatalogYearNote" to
"Notes."
Set rsMajors = db.OpenRecordset("SELECT * FROM PrimaryMajors WHERE
AssociatesDegree=False") 'Create recordset for all non Associates
Degrees.
If rsMajors.RecordCount > 1 Then 'If more than one non Associates
Degree
strSQL = "INSERT INTO Notes ( DegreeType, NoteTypeID, [Note] )
SELECT DISTINCT PrimaryMajors.DegreeType,
tblCampusCatalogYearNotes.NoteTypeID, tblCampusCatalogYearNotes.Note
FROM tblCampusCatalogYearNotes, PrimaryMajors WHERE
(((tblCampusCatalogYearNotes.NoteTypeID)=2) AND
((PrimaryMajors.AssociatesDegree)=False) AND
((tblCampusCatalogYearNotes.Campus)=[Forms]![frmProgramChange]!
[Campus]) AND ((tblCampusCatalogYearNotes.CatalogYear)=[Forms]!
[frmProgramChange]![CatalogYear]));"
Set qdf = db.QueryDefs("qupdTable")
qdf.SQL = strSQL
DoCmd.OpenQuery "qupdTable"
End If
The problem I'm running into is that the computer, for some reason,
thinks that there is only one non Associates Degree in
"PrimaryMajors." However, if I add the following sequence to figure
out which degree it's pulling, it not only displays both programs, but
the sequence above works fine.
Do Until rsMajors.EOF
MsgBox rsMajors!Program 'This is the field where the degree program
code is stored.
rsMajors.MoveNext
Loop
My question is... WHAT THE HELL IS GOING ON?
"PrimaryMajors." Now that the table is updated, I need to add
secondary degree notes to each non Associates Degree, but only if
there is more than one non Associates Degree.
To do this, I wrote the following sequence
'Add any 'Secondary Degree' notes from "tblCampusCatalogYearNote" to
"Notes."
Set rsMajors = db.OpenRecordset("SELECT * FROM PrimaryMajors WHERE
AssociatesDegree=False") 'Create recordset for all non Associates
Degrees.
If rsMajors.RecordCount > 1 Then 'If more than one non Associates
Degree
strSQL = "INSERT INTO Notes ( DegreeType, NoteTypeID, [Note] )
SELECT DISTINCT PrimaryMajors.DegreeType,
tblCampusCatalogYearNotes.NoteTypeID, tblCampusCatalogYearNotes.Note
FROM tblCampusCatalogYearNotes, PrimaryMajors WHERE
(((tblCampusCatalogYearNotes.NoteTypeID)=2) AND
((PrimaryMajors.AssociatesDegree)=False) AND
((tblCampusCatalogYearNotes.Campus)=[Forms]![frmProgramChange]!
[Campus]) AND ((tblCampusCatalogYearNotes.CatalogYear)=[Forms]!
[frmProgramChange]![CatalogYear]));"
Set qdf = db.QueryDefs("qupdTable")
qdf.SQL = strSQL
DoCmd.OpenQuery "qupdTable"
End If
The problem I'm running into is that the computer, for some reason,
thinks that there is only one non Associates Degree in
"PrimaryMajors." However, if I add the following sequence to figure
out which degree it's pulling, it not only displays both programs, but
the sequence above works fine.
Do Until rsMajors.EOF
MsgBox rsMajors!Program 'This is the field where the degree program
code is stored.
rsMajors.MoveNext
Loop
My question is... WHAT THE HELL IS GOING ON?