A
Adam
Hi All,
I have a questionnaire like form which contains fields from the table
'AuditMaster' like:
AuditID (Autonumber) key
AdvisorID (number)
AuditDate
AuditMonth
CallDate
CallRef
ContactName
ContactNotes
I then have a subform that contains data from two tables via a query:
QuestionID - table 'QuestionMaster'
QuestionDesc - table 'QuestionMaster'
QuestionID - table 'AuditResults'
ResultID - table 'AuditResults'
AuditID - table 'AuditResults'
AuditNotes - table 'AuditResults'
Now these two tables are linked 1 to Many, 1 being QuestionID from
Results table, and Many being QuestionID in QuestionMaster table.
Now when you open the form, it creates a new AuditID in AuditMaster
table as this is a autonumber. As AuditMaster is linked to AuditResults
by the AuditID field I need to find a way to update the AuditID field
in the subform so it updates the AuditID in the AuditResults table for
every question that is scored.
The subform is a continous form so if I do vb code like:
Forms!AuditSubform!AuditID = Me.AuditID
It only updates the first record in the continous subform!
Does anyone know how I can update the AuditID field for each question
that I mark in the subform, to copy what is provided in the
NewAuditfrm.AuditID field?
I hope I've made this clear, its really testing my knowledge!
Many Thanks
Adam
I have a questionnaire like form which contains fields from the table
'AuditMaster' like:
AuditID (Autonumber) key
AdvisorID (number)
AuditDate
AuditMonth
CallDate
CallRef
ContactName
ContactNotes
I then have a subform that contains data from two tables via a query:
QuestionID - table 'QuestionMaster'
QuestionDesc - table 'QuestionMaster'
QuestionID - table 'AuditResults'
ResultID - table 'AuditResults'
AuditID - table 'AuditResults'
AuditNotes - table 'AuditResults'
Now these two tables are linked 1 to Many, 1 being QuestionID from
Results table, and Many being QuestionID in QuestionMaster table.
Now when you open the form, it creates a new AuditID in AuditMaster
table as this is a autonumber. As AuditMaster is linked to AuditResults
by the AuditID field I need to find a way to update the AuditID field
in the subform so it updates the AuditID in the AuditResults table for
every question that is scored.
The subform is a continous form so if I do vb code like:
Forms!AuditSubform!AuditID = Me.AuditID
It only updates the first record in the continous subform!
Does anyone know how I can update the AuditID field for each question
that I mark in the subform, to copy what is provided in the
NewAuditfrm.AuditID field?
I hope I've made this clear, its really testing my knowledge!
Many Thanks
Adam