Hi all
I have a form with a tabular sub form, I have a button on the main form that the user clicks and when they do I want to automatically create a new record in the subform and to populate certain fields in the sub form how do I do this?
Currently running in a module
Main Form: FRMOrderDetails
Sub Form: SFRMCustomerDetails
I have tried this as an example but doesnt seem to work or creare onto a new record line
and
I have a form with a tabular sub form, I have a button on the main form that the user clicks and when they do I want to automatically create a new record in the subform and to populate certain fields in the sub form how do I do this?
Currently running in a module
Main Form: FRMOrderDetails
Sub Form: SFRMCustomerDetails
I have tried this as an example but doesnt seem to work or creare onto a new record line
Code:
[Forms]![FRMOrderDetails]![SFRMCustomerDetails].[Form]![TxtOrderingDate]= NOW()
and
Code:
[Forms]![FFRMOrderDetails]![SFRMCustomerDetails].setfocus
DoCmd.GoToRecord , , acNewRec
[Forms]![FRMOrderDetails]![SFRMCustomerDetails].[Form]![TxtOrderingDate]= NOW()