I have a form that contains a subform, and when a product is selected in a combo box, it is supposed to appear in the subform, together with it's price and other info. This bit works fine for the first product I enter, but the go to next record bit in the macro is not working properly, and I am told I am at the end of a recordset.
I've tried 2 ways of doing this - after the record has been entered I use GoToControl with the name of the subform, and then GoToRecord Next (have also tried New). Each time I get the 'Cant go to specified record - May be at the end of a recordset' error message. The other way was just using GoToRecord with object type Form and the Form name - this way I get an error that the object 'my subform' isn't open.
BUT!! Stranger than that, if I flip the form into design view, and then back into form view, the form re-appears with a new line in the sub-form which I can put another record in, and I have to repeat this feature with each product I want to appear in the sub form.
Any ideas anyone?
Thanks in advance,
Matt.
I've tried 2 ways of doing this - after the record has been entered I use GoToControl with the name of the subform, and then GoToRecord Next (have also tried New). Each time I get the 'Cant go to specified record - May be at the end of a recordset' error message. The other way was just using GoToRecord with object type Form and the Form name - this way I get an error that the object 'my subform' isn't open.
BUT!! Stranger than that, if I flip the form into design view, and then back into form view, the form re-appears with a new line in the sub-form which I can put another record in, and I have to repeat this feature with each product I want to appear in the sub form.
Any ideas anyone?
Thanks in advance,
Matt.