B
Bob
Hi Everybody
I have a form called frmListBox that is connected to a table tblListBox.
This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder"
and floats above (ie is pop-up) [frmInvoiceOrder]![zfrmInvoiceOrder]
Private Sub ListBox_DblClick(Cancel As Integer)
DoCmd.OpenForm "Forms![frmInvoiceOrder]![zfrmInvoiceOrder", , , , acFormAdd
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtCreatedDate] = Me!ListBox.Column(1)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtCreatedTime] = Me!ListBox.Column(2)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtFrom] = Me!ListBox.Column(3)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtTo] = Me!ListBox.Column(4)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![MemoContents] = Me!ListBox.Column(5)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtEbay#] = Me!ListBox.Column(6)
End Sub
Although all of the fields copy from "frmListBox" to "Forms![frmInvoiceOrder]![zfrmInvoiceOrder" OK
I cannot get it to add a new record to/in the subform before it copies the record.
The 2 main errors I get are:
error 2012 trying to refer to a form that doesn't exist.
error 2489 - The object 'Forms![frmInvoiceOrder]![zfrmInvoiceOrder' isn't open). but when I get this
error message, the subform is indeed open - i'm looking right at it!
It seems to me that although the subform is open "inside" the Mainform, Access 2000 doesn't
consider it to be open. Just viewable.
I did consider making an intermediate form and do it from there. I have done somethong similar
before. But this would be an untidy work around
If anyone could help I be most grateful.
Regards Smiley Bob
I have a form called frmListBox that is connected to a table tblListBox.
This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder"
and floats above (ie is pop-up) [frmInvoiceOrder]![zfrmInvoiceOrder]
Private Sub ListBox_DblClick(Cancel As Integer)
DoCmd.OpenForm "Forms![frmInvoiceOrder]![zfrmInvoiceOrder", , , , acFormAdd
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtCreatedDate] = Me!ListBox.Column(1)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtCreatedTime] = Me!ListBox.Column(2)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtFrom] = Me!ListBox.Column(3)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtTo] = Me!ListBox.Column(4)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![MemoContents] = Me!ListBox.Column(5)
Forms![frmInvoiceOrder]![zfrmInvoiceOrder].Form![txtEbay#] = Me!ListBox.Column(6)
End Sub
Although all of the fields copy from "frmListBox" to "Forms![frmInvoiceOrder]![zfrmInvoiceOrder" OK
I cannot get it to add a new record to/in the subform before it copies the record.
The 2 main errors I get are:
error 2012 trying to refer to a form that doesn't exist.
error 2489 - The object 'Forms![frmInvoiceOrder]![zfrmInvoiceOrder' isn't open). but when I get this
error message, the subform is indeed open - i'm looking right at it!
It seems to me that although the subform is open "inside" the Mainform, Access 2000 doesn't
consider it to be open. Just viewable.
I did consider making an intermediate form and do it from there. I have done somethong similar
before. But this would be an untidy work around
If anyone could help I be most grateful.
Regards Smiley Bob