open a subform as a new record

shutzy

Registered User.
Local time
Today, 04:35
Joined
Sep 14, 2011
Messages
775
i have a form with a subform. when opening the form it says that subform is not open so it cant open a new record.

is there anyway of getting round this. i tried creating the subform seperately and using macros to open in a new record. just a note, the record bar at the bottom of the subform allows me to select a new record but i cant find a way for it to happen automatically.

thanks
 
I think you'll need to be a bit more detailed with your question, as it's not quite clear (to me, at least) what you're saying. Are the form and subform even linked (master/child) by fields in their respective recordsources?
 
the form is of a one to many table.

i have OrderID in the Oders table and then i have the same OrderID in OrdersItems table.

on the Parent form i have from Orders table

OrderID / ClientDetailsID / DateOfOrder / TimeOfOrder / OrderNotes

On the child(subform) i have from OrdersItems table

OrdersItemsID / OrderID / ItemsID / Cost.

what i am trying to do is really for visual effects. i am trying to open a form at a particular OrderID. display all the relevant details to that order, ie. name, time, date. then and i think it is the only way have a subform at the bottom that displays the Items that are with that order at the same time i would like to be able to add Items to the order by creating a new record in OrdersItems table. it lets me do this through the record navigation at the bottom of the screen but i dont know how to tell it automatically. i know how to do this if the subform was seperate but i am not that experienced with the working of a subform. it is something i want to learn as it may lead to less forms for the user to navigate(not neccessarily less forms in the database tho)

thanks
 
i have uploaded the full database. i have removed all the personal details. if you navigate to frmDiaryView-Appointments and open it you will see what i am trying to achieve. i would like the subform at the botton to open as a new record so i can click on the left list box and click the tick to add further items easily as well as view the current items in the list box on the right.
 

Attachments

Users who are viewing this thread

Back
Top Bottom