NigelShaw
Registered User.
- Local time
- Today, 21:44
- Joined
- Jan 11, 2008
- Messages
- 1,575
Hi,
im stuck. how can i create a new record on a subform? originally, this was a pop up form and everything worked ok as the new record was set on the pop up form but i have now made it into a subform. my existing code is -
private sub addtherecord()
If Labour.Visible = False Then
Forms![mainform]![MainFormSubForm]![Pay Reg].Value = True
Forms![mainform]![MainFormSubForm]![subform subform].SetFocus
DoCmd.GoToRecord , , acNewRec
end sub
pay reg is a tick box from the table so when it is made true, a new record is set on the subform. there is a sub subform that is updated so i can make many payments to a person based on the above record being created. i need the sub subform to create a new record leaving the subform record unchanged. i can create the subform new record but the current code above creates a new record on the subform not the sub subform.
sorry for all of the subs.....
regs,
NS
im stuck. how can i create a new record on a subform? originally, this was a pop up form and everything worked ok as the new record was set on the pop up form but i have now made it into a subform. my existing code is -
private sub addtherecord()
If Labour.Visible = False Then
Forms![mainform]![MainFormSubForm]![Pay Reg].Value = True
Forms![mainform]![MainFormSubForm]![subform subform].SetFocus
DoCmd.GoToRecord , , acNewRec
end sub
pay reg is a tick box from the table so when it is made true, a new record is set on the subform. there is a sub subform that is updated so i can make many payments to a person based on the above record being created. i need the sub subform to create a new record leaving the subform record unchanged. i can create the subform new record but the current code above creates a new record on the subform not the sub subform.
sorry for all of the subs.....
regs,
NS