Hi
i have a main form that contains customer data. On the main form i have a datasheet subform that displays the history of transaction for each customers.
the datasheet only displays 3 fields from the table. what i want to do is to create a button that opens a popup form that displays the transaction details (all the fields) based on the invoice no from the datasheet subform.
the main form is frm_main_customer
and the subform is frm_main_transaction
and the textbox in the datasheet subform from which i want to retrieve the data is called txt_invoice_no
what i did was create a button that opens the transaction detail form lets say it is called frm_transaction. in the frm_transaction onLoad event i create a vba code to filter the data based on the invoice_on on the datasheet subform.
the code was like
me.filter = invoice_no = "Forms!frm_main_customer.txt_invoice_no.value
me.filteron = true
what happened was when i run the application and click the detail button it is asking for a parameter which is the invoice_no.
if i put the invoice no in the parameter box it will popup the form with the correct data. however i want it to display the data without asking for the parameter.
i've used the code for other forms (but not a datasheet subform) and it worked perfectly.
i've also tried to change the code to:
me.filter = invoice_no = "Forms!frm_main_transaction.txt_invoice_no.val ue"
me.filteron = true
still cannot make it work.
any idea??
thx