synchronisation between forms

pb21

Registered User.
Local time
Today, 16:13
Joined
Nov 2, 2004
Messages
122
I have a form that doesnt close, it gets the basic skeletal details of a booking.

I have a button that opens the next form to input the address details and it wont sync.

I have a function that checks to see if the first enrolment form is open and the function works fine. it then creates a filter string based on the studentID of the main form and switched on the filter of the second form, which appears to work. What it does is add a new autonumber in the studentID field of the second input form.

the code for synchronisation is :

' Declare and set a variable to store the WHERE
' clause that describes the records you want to
' display.
Dim strCond As String
strCond = "StudentID = Forms!FrmEnhancedEnrolment!StudentID"

' Use the IsLoaded function
' to check whether the Enrolment
' form is open, then set the properties.
If IsLoaded("FrmEnhancedEnrolment") Then
Forms![FrmEnrolmentContact].FilterOn = True
Forms![FrmEnrolmentContact].Filter = strCond
End If


Coutesy of Microsoft and Northwind

I open the second form :

DoCmd.OpenForm "FrmEnrolmentContact", acNormal, , , acFormEdit


As I recall this was working last night, all I have done is add some more fields to the respective forms.

Help would be appreciated.

I chose this way so that I could guide the user through the enrolment process.

Regards in advance

Peter
 
cracked it

I had to save the record before I called the second form which cured the problem, I had thought incorrectly that access saved it automatically but as I wasnt closing the form it wasnt the case.

Thanks
 

Users who are viewing this thread

Back
Top Bottom