loading a form problem

HarrySpencer

Registered User.
Local time
Today, 02:03
Joined
Apr 10, 2007
Messages
25
I have a command button on my main form used to load a search form and query which works fine, when you've found the correct record the form will return to the main form and load the correct record in the main form. My problem is trying to load the search form from another form, my guess is that it because the main form isn't loaded, is there a someway of determining if the main form is loaded and if not loading it, or any extra code I can add to the search form to load main form.

here is the code i use to return to the main form after selecting a record

Dim rst As Recordset

Set rst = Forms![MainPage_fm].RecordsetClone
rst.FindFirst "[NiNo]='" & Me![txtNiNo] & "'"

If rst.NoMatch = False Then
Forms![MainPage_fm].Bookmark = rst.Bookmark
End If
DoCmd.Close acForm, "SearchSurname_cfm", acSaveNo

any help is greatly appreciated, Cheers Harry
 

Users who are viewing this thread

Back
Top Bottom