new subform record

Yes it could, but this explanation of yours is getting a bit complicated. Is there anyway you can send me this thing so I can take a look at it? I already have the pictures in this thread to assist me...

From everything you've said previously too, I think you might be having the same problem as I referenced above about the Primary Key, but you mentioned that the SUBSUB is unbound. I am thinking the problem is the same, but I have no idea why...how about sending it?
 
Adam,

i have sent you a link to the file location. the area in question is,

open the form " Contractors"
click on payments ( bottom left )
click on make a payment
click yes
a subform will appear below with text boxes. add a number in invoice, detail in description and figure in material.
when you tab out of the material box, the data will appear in the datasheet below. if you do the same again, it gets over written. the datasheet is linked to the table " Payments"
the mainform is linked to the qry " ContractorQry" and the subform is linked to Payment numbers.

the idea is

click on new payments
a new payment number is created when data is entered to the boxes,
add unlimited payments to the payment number.

i will upload a version when it worked as a pop up.

NS
 
Nigel, here is something to note when trying to add a record to the subform of a subform (nested subform):

This does not work:
Code:
Me.sub1.Form!mysub2.SetFocus
   Me.sub1.Form!sub2.Form!ControlName.SetFocus
      DoCmd.RunCommand acCmdRecordsGoToNew
I know this is strange, as the above code should work, because the focus code does actually set the focus to the proper control on the nested subform. However, (I suspect) there is a problem when you don't give any attention to the first subform (subform of the MAIN). When you skip over the .Setfocus action for the first subform, the DoCmd command creates a new record for the main form entirely! Don't ask me why; I have no idea.

However, I know this code does work:
Code:
Me.sub1.SetFocus
   [COLOR="Red"]Me.sub1.Form!mysub2.SetFocus[/COLOR]
      Me.sub1.Form!sub2.Form!ControlName.SetFocus
         DoCmd.RunCommand acCmdRecordsGoToNew
I have no idea why you have to set the focus to each subform in succession like this to get a new record ONLY in the nested subform (without affecting the other forms), but you do. Hopefully this answer will solve your problem. :)
 

Users who are viewing this thread

Back
Top Bottom