Kalyan Ganesan
Programmer
I have a main form and a subform, the main form has a combo box that will have a list of items patient no, once i choose one of those the sub form gets populated with data, the subform has a recorsource already set during design in the property sheet,but the challenge is i need to use one of the combo boxes in the subform to set a Filter, when i use it as a filter and write this code in the
Me.Filter = "Discount_Code=10454835"
Me.FilterOn = True
Me.Refresh
and it works if its written in a Button or something,but if its in the combo box it throws the unique constraint error as it thinks the data is getting updated as a new patient(discount code) and the patient is a existing one..so how do i by pass this, i should use the combo to choose the discount code and pull up patient details for that discount code but not update the discount code and after i use the combo to do this the subform should be updateable
Thanks
Me.Filter = "Discount_Code=10454835"
Me.FilterOn = True
Me.Refresh
and it works if its written in a Button or something,but if its in the combo box it throws the unique constraint error as it thinks the data is getting updated as a new patient(discount code) and the patient is a existing one..so how do i by pass this, i should use the combo to choose the discount code and pull up patient details for that discount code but not update the discount code and after i use the combo to do this the subform should be updateable
Thanks