Moving from a form to a subform

S

stevew

Hi All
Access 2000, Windows XP
I have a form with a subform on it. The form has customer deatils and the
subform is a booking form. I have created a button to move to the subform to
the main form after a booking has been made. On the main form I have put a
List Box which runs a query to show all of the bookings. This seems to work
ok. However, when I try and move back to the subform I get form is not open.
The cose I have used is:
Private Sub cmd_Book_Click()
DoCmd.SelectObject acForm, "frm_Customer", False 'goes to the main form
ok
DoCmd.GoToControl "LstDaily" 'goes to this control ok
DoCmd.Requery "LstDaily" 'runs the query and update the list box
DoCmd.SelectObject acForm, "frmsub_Appointments", False ' this is where
it fails and I cannot get back to the subform - error subform is not open.
End Sub

If nayone has any ideas would appreciate some help please. I've tried to use
a goto control but the same thing happens - I just cannot move nack to the
subform - help!!!!

Steve W
 

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