there are many reports tied to each job number. There are many job numbers so that there can be many duplicate reports. I decided to use an append query to form the database and each report is entered into a temporary table and when the save report button is pushed, that temporary table gets appended to the real report table.
The same exact thing happens with the item list for the same reasons. A list of items per report, there may be duplicate item numbers for multiple reports.
For the items table there is a form linked to a query so that when a new item is entered the inspector can tell what has been entered and has not. When hitting the ''save item'' button, it goes to this sub:
Code:
Private Sub Command61_Click()
DoCmd.GoToRecord , , acNewRec
Dim t As Object
Set t = CurrentDb
Set t1 = t.openrecordset("tempTestResults")
t1.EDIT
t1("FILE").Value = job1
t1("Report No").Value = report1
t1.Update
DoCmd.OpenQuery ("TESTRESULTAppendQuery")
DoCmd.Close acForm, "testresults"
'Forms![inspection]![testresults].Form.SetFocus
'DoCmd.SelectObject acForm, "testresults", True
'DoCmd.BrowseTo acBrowseToForm, "testresults", "inspection.testresults", "item #"
'DoCmd.SetFocus "!forms!inspection!testresults"
'!forms!inspection!testresults!testresultactivate
'DoCmd.SelectObject acForm, "testresults"
'DoCmd.GoToControl "testresults"
'DoCmd.GoToRecord , , acNewRec
End Sub
the last few lines which have been remarked out were various efforts to update the form in some way, all of them unsuccessful, one of them references a dummy text box that was put into the form in another effort to activate the form somehow. job1 and report1 are linked to hidden fields on the subtable (addTESTRESULT) which are in turn linked to their parent fields.
if a single .requery command was able to get through to the form, my problem would be solved I think
ps. the form is set to activate on any event. Clicking on it, for example, updates it, if only Access could be fooled into thinking the form was being clicked on automatically.