R
Ron
Okay, I know this is VBA 101, but I've been away from it a long time and
having brainfreeze. Here is the scenario:
I have a form with a subform. Subform is a datasheet view of a table. I
want user to select a record in subform and click Edit button and have a new
form open with just that record displayed. I know it simple, but I've been
so doing so many more advanced things, I have forgotten a basic and can't
find it in the help in a meaningful way.
Subform Recordsource is :
SELECT tblInvoiceHeader.Recno, tblInvoiceHeader.PatientNbr,
tblInvoiceHeader.InvoiceDate, tblInvoiceHeader.InvoiceNbr,
tblInvoiceHeader.Fname, tblInvoiceHeader.lname FROM tblInvoiceHeader ORDER
BY tblInvoiceHeader.Recno DESC;
So when user clicks the Edit button, I wanted it to read the
tblInvoiceHeader.Recno value and use it to find/filter the table.
I can set Recordsource for EditForm to "tblInvoiceHeader", but how do I get
to the record ? I tried coding filter in the docmd.OpenForm but either
screwed that up or that isn't the right way to go.
having brainfreeze. Here is the scenario:
I have a form with a subform. Subform is a datasheet view of a table. I
want user to select a record in subform and click Edit button and have a new
form open with just that record displayed. I know it simple, but I've been
so doing so many more advanced things, I have forgotten a basic and can't
find it in the help in a meaningful way.
Subform Recordsource is :
SELECT tblInvoiceHeader.Recno, tblInvoiceHeader.PatientNbr,
tblInvoiceHeader.InvoiceDate, tblInvoiceHeader.InvoiceNbr,
tblInvoiceHeader.Fname, tblInvoiceHeader.lname FROM tblInvoiceHeader ORDER
BY tblInvoiceHeader.Recno DESC;
So when user clicks the Edit button, I wanted it to read the
tblInvoiceHeader.Recno value and use it to find/filter the table.
I can set Recordsource for EditForm to "tblInvoiceHeader", but how do I get
to the record ? I tried coding filter in the docmd.OpenForm but either
screwed that up or that isn't the right way to go.