Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After Update Question

Status
Not open for further replies.

gator9

Technical User
May 17, 2002
162
US
I am a field called Name that is subform viewed in data view. I wont to to refresh the master form only if there is one or less records showing in the subform. I can't seem to get the if event to work right and help?

Sincerely,

Charles
 
Charles, thanks for sharing.
Can you please explain the members how you solved your problem ?
 
I used another approach all together. the code below will direct you to the main form if the ID of the main form is null. This keeps you from having useless records added in the sub form table unassociated with the main form.


Private Sub TravelerInfoDetails_Enter()
If IsNull(Me![InfoID]) Then
DoCmd.GoToControl "TravelerInfoListing"
End If
End Sub

This code stops you from adding additions to a record if one a record is already in use. Very useful in an environment like a calculating form where you will not add multiple records.

Private Sub Form_Current()
If IsNull(Me![InfoID]) Then
With Me
.AllowAdditions = True
End With
Else
With Me
.AllowAdditions = False
End With
End If
End Sub


Sincerely,

Charles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top