T
Ted
in my a2k app'n, i have a form (Audit Reports), the 'main form', on which
there are two child/sub-forms, 'Evaluations' and 'Patients'. for now, i would
like to create a command button on the Audit Reports form which will add a
new/blank record into the table ('IRB') behind it. once i get this outta the
way, i'll go ahead and add two additional buttons on the same main form
(Audit Reports) whose purpose will be to add new/blank record into either the
'Evaluations' or the 'Patients' tables underlying the said pair of sub-forms.
in every instance, the 'Add records' property of the form/sub-form will be
set to 'No' so that user cannot add record w/o using the button provided. i
used the cmdbutton wizard to add new record and embellished it with two lines
which toggle the disabled property first to 'on' then to 'off'. it is below:
Private Sub AddRecord_Click()
On Error GoTo Err_AddRecord_Click
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
Me.AllowAdditions = False
Exit_AddRecord_Click:
Exit Sub
Err_AddRecord_Click:
MsgBox Err.description
Resume Exit_AddRecord_Click
End Sub
as the heading said, this isn't working; what i see when i click on it is
that the screen flickers for around 1/2 a second and then nothing happens;
there's no new record added. i have tried adding new/blank records to each of
the main/sub-forms using the button with the '*' natively provided and no
problemo, so what's up?
-ted
there are two child/sub-forms, 'Evaluations' and 'Patients'. for now, i would
like to create a command button on the Audit Reports form which will add a
new/blank record into the table ('IRB') behind it. once i get this outta the
way, i'll go ahead and add two additional buttons on the same main form
(Audit Reports) whose purpose will be to add new/blank record into either the
'Evaluations' or the 'Patients' tables underlying the said pair of sub-forms.
in every instance, the 'Add records' property of the form/sub-form will be
set to 'No' so that user cannot add record w/o using the button provided. i
used the cmdbutton wizard to add new record and embellished it with two lines
which toggle the disabled property first to 'on' then to 'off'. it is below:
Private Sub AddRecord_Click()
On Error GoTo Err_AddRecord_Click
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
Me.AllowAdditions = False
Exit_AddRecord_Click:
Exit Sub
Err_AddRecord_Click:
MsgBox Err.description
Resume Exit_AddRecord_Click
End Sub
as the heading said, this isn't working; what i see when i click on it is
that the screen flickers for around 1/2 a second and then nothing happens;
there's no new record added. i have tried adding new/blank records to each of
the main/sub-forms using the button with the '*' natively provided and no
problemo, so what's up?
-ted