Forms is loaded function

X

XRAIVE

Hi All,

I currently have the current setup

TravelForm

TripsForm

TripEventsForm

When a user fills out the the travel form and wants to add trips to that
record they press the Addbuttton. The trips form references the specific
record using the IsLoaded Function. On the OnActivate propery of the Trips
form I have the following code

If IsLoaded("TravelForm") Then
If Forms![TravelForm]![TravelForm Subform].Form.RecordsetClone.
RecordCount > 0 Then
DoCmd.GoToControl "TripID"
DoCmd.FindRecord Forms![TravelForm]![TravelForm Subform].Form!
[TripID]
End If
End If

Now I did the same setup for the TripEventsForm when a user wants to add an
event for each trip.

I keep getting an error "DoCmd.FindRecord Forms![TravelForm]![TravelForm
Subform].Form![TripID]" stating that this is the problem.

Can you help out with this.
 
J

June7 via AccessMonster.com

Is there more to the error message you are getting?
Hi All,

I currently have the current setup

TravelForm

TripsForm

TripEventsForm

When a user fills out the the travel form and wants to add trips to that
record they press the Addbuttton. The trips form references the specific
record using the IsLoaded Function. On the OnActivate propery of the Trips
form I have the following code

If IsLoaded("TravelForm") Then
If Forms![TravelForm]![TravelForm Subform].Form.RecordsetClone.
RecordCount > 0 Then
DoCmd.GoToControl "TripID"
DoCmd.FindRecord Forms![TravelForm]![TravelForm Subform].Form!
[TripID]
End If
End If

Now I did the same setup for the TripEventsForm when a user wants to add an
event for each trip.

I keep getting an error "DoCmd.FindRecord Forms![TravelForm]![TravelForm
Subform].Form![TripID]" stating that this is the problem.

Can you help out with this.
 
F

Forms is loaded function

i solved the problem thank you for your response i had put in on the second
forms on activate property to look for the new entry on the main form. This
returned an error because the record hadn't been saved yet.

June7 via AccessMonster.com said:
Is there more to the error message you are getting?
Hi All,

I currently have the current setup

TravelForm

TripsForm

TripEventsForm

When a user fills out the the travel form and wants to add trips to that
record they press the Addbuttton. The trips form references the specific
record using the IsLoaded Function. On the OnActivate propery of the Trips
form I have the following code

If IsLoaded("TravelForm") Then
If Forms![TravelForm]![TravelForm Subform].Form.RecordsetClone.
RecordCount > 0 Then
DoCmd.GoToControl "TripID"
DoCmd.FindRecord Forms![TravelForm]![TravelForm Subform].Form!
[TripID]
End If
End If

Now I did the same setup for the TripEventsForm when a user wants to add an
event for each trip.

I keep getting an error "DoCmd.FindRecord Forms![TravelForm]![TravelForm
Subform].Form![TripID]" stating that this is the problem.

Can you help out with this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top