Log in

View Full Version : Subform in datasheet view but need button


erosinski
Sep 6, 2005, 08:44 AM
I need a duplicate record button to duplicate records in the subform which in is datasheet view. Is there is a way to display the button on the datasheet? Or if there is an easy way to put the button on the main form?

ScottGem
Sep 6, 2005, 10:47 AM
I need a duplicate record button to duplicate records in the subform which in is datasheet view. is there is a way to display the button on the datasheet? or if there is an easy way to put the button on the main form?

Personally, I almost never use datasheet mode. I prefer the flexibility of continuous form mode.

I would put the code in the doubleclick event of the subform's Detail band. Double click the record and duplicate it then requery the subform.

erosinski
Sep 6, 2005, 10:58 AM
Good idea.. I use datasheet view because it is the easiest way to view the data. I have a lot of things to input in the main form as well as the subform.. it helps to have the view of all the records in the subform. I will try the double click event and see if it works well for me, thank you

ScottGem
Sep 6, 2005, 03:54 PM
good idea.. i use datasheet view because it is the easiest way to view the data. I have alot of things to input in the main form as well as the subform.. it helps to have the view of all the records in the subform. I will try the double click event and see if it works well for me, thank you

Generally a subform is part of a one to many relation. So the subform needs to display multiple related records. That's why I use continuous form mode. You can do everything that datasheet mode does and a lot more.