Access Access 2007 Sub form issue

Joined
Feb 8, 2009
Messages
1
Reaction score
0
Hi I have a tabbed form and one tab sub form shows total costs however another tab subform gives the option to add an activity and thereby increase the total cost.

I have everything referenced correctly annd totals work out when i close and reopen the master form.

what I need is a button on the activity sub form to save the record, refresh the totals and open new record on the activity sub form.

Have been able to do bits ie open new form but the totals don't refresh, have been able to requery the totals subform and get the correct value but cannot open the new record on the sub form.

It has to be doable
On the sub form I have tried

If IsNull(Me.diarystuddate) Then
MsgBox "Activity date is must be set "
Else
DoCmd.GoToRecord , , acNewRec - Have tried various Requery options here

End If
End Sub

on the main form I have tried - but really want the button on the above sub form

Private Sub Command92_Click()
On Error GoTo Err_Command92_Click

Screen.PreviousControl.SetFocus
Me.Requery
Exit_Command92_Click:
Exit Sub
Err_Command92_Click:
MsgBox Err.Description
Resume Exit_Command92_Click

Any help greatly appreciated I have been at this for nearly a day!!!!!!

Humph
 
Back
Top