For the first time I am trying to use DataGrid instead of sub form.
The BE is on Server and FE is MS Access db. The connectivitiy of the Main form thru ADODB is ok. The Main form is set to get the data from header table named T_SalesInvoiceHead. The DataGrid's information will want to store in a footer table called T_SalesInvFoot.
Using Datagrid's property I named column headings and entered respective field names in the DataGrid. But I need to know how I can set row source to this DataGrid. Currently I can not enter or move into the columns of the DataGrid.
My plan is to place a combo box for the items that generated from table T_ProductMaster (same like sub form) and pull the related column data of the recordset and throw on to other fields of the DataGrid.
For your reference, field names in table T_ProductMaster are as under.
The Subform should allow Edit and Add and on the last Record if record Selectors there should be an asterisk. This denotes new record. If you go into the combibox and change it then a new record should be created.
On your Subforms Query TotalValue should be declared:
T_SalesInvFooter.[Qty] * T_SalesInvFooter.[Price]
Its faster to do this calculation at the query level although there is nothing to stop you doing this on the form itself but the query caculation can also be used in the Invoice you produce.
It is not sub form. It is Datagrid and thats my question how can I add one or more than record in the grid while it does not have any record source like actual sub form we do. I checked property of the Datagrid and I did not find any way to supply record source for it.