Hi all,
I have a main form called "frmMain" which is based on a table called tblCompanyName, this table only has on field in it which is "CompanyName", so my main form only has this field on it. Also on my main form there is a subform called "frmSubform" which is based on a table called tblInvoice this table has various fields such as Company Name, Company Address, Invoice Number, Invoice Amount etc.
When I open up my main form "frmMain" the subform "frmSubform" only shows details which correspond to that particular Company - so for example if my main form is set to Joe Bloggs Ltd then the subform only shows invoices related to Joe Bloggs Ltd. This all works fine.
What I am now trying to do is perform a search on the subform - I click a button on the subform which is based on a query which asks for an Invoice Number, once I have entered the number and pressed ok the subform finds and displays that record in the subform but does not change the Main form to match with the corresponding company (I think that makes sense) e.g. I am in Joe Bloggs Ltd in frmMain and the subform is displaying invoices for Joe Bloggs, now I want to search for an Invoice which does not relate to Joe Bloggs but to "Mr Smiths Builders", I press "Search Invoice" enter the Invoice number when prompted and press ok. My subform now displays the right invoice but my "frmMain" is still set to "Joe Bloggs" and has not changed to show that this invoice is for "Mr Smith".
Can anybody out there help me with this.
Thanks in advance.
Steven. C.
I have a main form called "frmMain" which is based on a table called tblCompanyName, this table only has on field in it which is "CompanyName", so my main form only has this field on it. Also on my main form there is a subform called "frmSubform" which is based on a table called tblInvoice this table has various fields such as Company Name, Company Address, Invoice Number, Invoice Amount etc.
When I open up my main form "frmMain" the subform "frmSubform" only shows details which correspond to that particular Company - so for example if my main form is set to Joe Bloggs Ltd then the subform only shows invoices related to Joe Bloggs Ltd. This all works fine.
What I am now trying to do is perform a search on the subform - I click a button on the subform which is based on a query which asks for an Invoice Number, once I have entered the number and pressed ok the subform finds and displays that record in the subform but does not change the Main form to match with the corresponding company (I think that makes sense) e.g. I am in Joe Bloggs Ltd in frmMain and the subform is displaying invoices for Joe Bloggs, now I want to search for an Invoice which does not relate to Joe Bloggs but to "Mr Smiths Builders", I press "Search Invoice" enter the Invoice number when prompted and press ok. My subform now displays the right invoice but my "frmMain" is still set to "Joe Bloggs" and has not changed to show that this invoice is for "Mr Smith".
Can anybody out there help me with this.
Thanks in advance.
Steven. C.