Hi all. 
I have this problem, it might be simple to resolv but I just don't see it.
I have recordsets bound to a database through code using DAO; these are publicly defined as follows:
Public db as Database
Public rs1 as DAO.Recordset
and several other recordset defined;
In a Main form I have a sub-form; the Main form is bound through code to the recordset, say rs1 or table1, and the sub-form is not bound through code but through the properties of the sub-form itself, in this case to a Query (Data Source: Query1) which in trun runs every time the main form Field1 changes
Every time I want to add/edit record to/on rs1(Main Form) I also need to allow the user to add/edit records on/to rs2/table2 through the sub-form, but remember this is not bound though code but through properties (Data Source: Query1)
The code works fine for the add/edit of the Main Form, but i'm how do I do add new/edit the sub-forms recordset/table?
The code I have for the Add New is the following:
vBookmark = rsLogHeadAM.Bookmark - rs1 bookmark it
DetailBMark = rsRouteLogAM.Bookmark - rs2 bookmark it
Me.TripNo = "" - set the textbox to nothing
Me.CtrNum = "" - set "
Me.WkEnding = "" - set "
Me.TripNo.SetFocus - set focus to main form's field(textbox)
Call UnlockTrip - since they're locked, unlock them
rsLogHeadAM.AddNew - add new record to main form rs1/table1
-- how do i clear the sub-form for it to allow users to add new records --
and
-- the edit its ok, i just unlock the sub-form
-- how to update (save) the new or edited record on the sub form?
-- when a new record, how do i clear the sub-form?
Thank you all, I really appreciate your help!
EA
I have this problem, it might be simple to resolv but I just don't see it.
I have recordsets bound to a database through code using DAO; these are publicly defined as follows:
Public db as Database
Public rs1 as DAO.Recordset
and several other recordset defined;
In a Main form I have a sub-form; the Main form is bound through code to the recordset, say rs1 or table1, and the sub-form is not bound through code but through the properties of the sub-form itself, in this case to a Query (Data Source: Query1) which in trun runs every time the main form Field1 changes
Every time I want to add/edit record to/on rs1(Main Form) I also need to allow the user to add/edit records on/to rs2/table2 through the sub-form, but remember this is not bound though code but through properties (Data Source: Query1)
The code works fine for the add/edit of the Main Form, but i'm how do I do add new/edit the sub-forms recordset/table?
The code I have for the Add New is the following:
vBookmark = rsLogHeadAM.Bookmark - rs1 bookmark it
DetailBMark = rsRouteLogAM.Bookmark - rs2 bookmark it
Me.TripNo = "" - set the textbox to nothing
Me.CtrNum = "" - set "
Me.WkEnding = "" - set "
Me.TripNo.SetFocus - set focus to main form's field(textbox)
Call UnlockTrip - since they're locked, unlock them
rsLogHeadAM.AddNew - add new record to main form rs1/table1
-- how do i clear the sub-form for it to allow users to add new records --
and
-- the edit its ok, i just unlock the sub-form
-- how to update (save) the new or edited record on the sub form?
-- when a new record, how do i clear the sub-form?
Thank you all, I really appreciate your help!
EA