Xenix
Registered User.
- Local time
- Today, 23:10
- Joined
- Oct 8, 2001
- Messages
- 124
Hi,
I want to click a button on my main form and for it to create as many records as there are tray numbers. The main form is called WorkOrderDetails and the sub form is TrayDetails1
The code I have tried using is
im x As Integer
x = 0
For x = 0 To Forms!workorderdetails!TrayDetails1!Total
x = x + 1
Forms!workorderdetails!TrayDetails1!NumberofTrays = x
DoCmd.GoToRecord , Forms!workorderdetails!TrayDetails1, acNewRec
Next
But this will not work I guess because the TrayDetails1 subform is not the active form
can anyone help me?
I want to click a button on my main form and for it to create as many records as there are tray numbers. The main form is called WorkOrderDetails and the sub form is TrayDetails1
The code I have tried using is
x = 0
For x = 0 To Forms!workorderdetails!TrayDetails1!Total
x = x + 1
Forms!workorderdetails!TrayDetails1!NumberofTrays = x
DoCmd.GoToRecord , Forms!workorderdetails!TrayDetails1, acNewRec
Next
But this will not work I guess because the TrayDetails1 subform is not the active form