Search results for query: *

  1. R

    How to fit Windows Form to any screen resolution?

    Hi, I have made a project in windows form in visual studio community editon 15. My all form was designed in 1024 x 768 resolution. When I run setup on another pc or laptop the screen resolution does not matches. If my clients using different resolution like 1600 x 1200 or 1600 x 900 or any...
  2. R

    Resolved Conversion from type 'DBNull' to" to type 'Integer' is not valid in OleDbDataReader

    Thanks jmcilhinney. Actually it was 7th column. I change code to - If dr.Read() Then Dim number = If(dr.IsDBNull(6), "", dr.GetValue(6)) TxtRefNo.Text = number.ToString dr.Close() End If Thanks Again.
  3. R

    Resolved Conversion from type 'DBNull' to" to type 'Integer' is not valid in OleDbDataReader

    Hello, I have added 6th column to my access database table named as TblInvoice. I am retrieving data from this column in text box named as TxtRefNo My code is Public Sub InvInfo() con.Close() con.Open() str = "Select * from TblInvoice where InvoiceID=@id" cmd =...
  4. R

    call CellContentDoubleClick event from button outside DataGridView?

    Thanks jmcilhinney I applied your code for EditRow() as - Private Sub EditRow(row As DataGridViewRow) Dim cell = row.Cells Using dialogue As New FrmAddItemsNew With dialogue .TxtTestID.Text = cell(0).Value.ToString()...
  5. R

    call CellContentDoubleClick event from button outside DataGridView?

    Hellow, I have code for DataGridView1_CellContentDoubleClick to edit row from another form as Private Sub DataGridView1_CellContentDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellContentDoubleClick Dim cells = DataGridView1.Rows(e.RowIndex).Cells...
  6. R

    Rows added from another form but not update in datatable

    I have a form named FrmInvoice. It has a datagridview witch populate data from following code on form load event. Try Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Access\Sale.accdb") 'Dim cmd As OleDbCommand = New...
  7. R

    Question Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound.

    @jmcilhinney, Thanks for your reply. I am not that much expert in writing code. How to write this code and where ? Can you write code for me ?
  8. R

    Question Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound.

    Hi, I have a windows form named as FrmInvoiceEdit. In this form saved Invoice is displayed in datagridview1 by searching Invoice no. in text box which is named as TxtInvoiceNo. The code is Dim cmd As New OleDbCommand("SELECT * from TblTest WHERE InvoiceID = @InvoiceID", con) With...
  9. R

    How to print original, duplicate copy with crystal report

    Hello, I am using SAP crystal report version 13.0.4 I have a invoice designed in this report. Now I want to Print the same Invoice with Original Copy, Duplicate Copy on each new page's Top Right side. I have tried Parameter Field. In Value Section I typed Original Copy, next line Duplicate Copy...
  10. R

    How to print Specific Invoice with Crystal Report ?

    Hello, I have a project in which Invoice is generated and saved in MS Access database. When User search the Invoice by Date wise and Customer wise with Form - FrmSalesReport, the data is displayed from TblInvoiceQuery in datagridview. When user click desire customer, another Form named...
  11. R

    Answered How to transfer updated rows of datagridview to database ?

    Thanks jmcilhinney I will try this.
  12. R

    Answered How to transfer updated rows of datagridview to database ?

    Hello, I have a windows form in which it has a datagridview which shows data from Access database table named TblTest by entering Invoice number in Text box named as TxtInvoiceNo. The code for this is - Dim cmd As New OleDbCommand("SELECT * from TblTest WHERE InvoiceID = @InvoiceID", con)...
  13. R

    Answered Extract Cash and Credit Total Separately from datagridview

    Thanks, I understood the code now. It is working without error. Thank you again.
  14. R

    Answered Extract Cash and Credit Total Separately from datagridview

    Thanks I have made changes as following Dim cashSubtotal = CDec(dt.Compute("SUM(Amount)", "TypeofSale = 'Cash'")) Dim creditSubtotal = CDec(dt.Compute("SUM(Amount)", "TypeofSale = 'Credit'")) Dim total = CDec(dt.Compute("SUM(Amount)", String.Empty)) Dim...
  15. R

    Answered Extract Cash and Credit Total Separately from datagridview

    Thanks for your advice jmcilhinney, I have made following code from your solution. Dim cmd As New OleDbCommand("SELECT * from TblInvoiceQuery WHERE DateOfSale BETWEEN @DateOfSaleFrom AND @DateOfSaleTo AND CustomerName = @CustomerName", con) With cmd.Parameters...
  16. R

    Answered Extract Cash and Credit Total Separately from datagridview

    Hello, I have a unbound datagridview which depend on Query from Access database like following - Column1 Column2 Column3 Column4 Column5 Date InvoiceID CustomerName Cash / Credit Amount...
  17. R

    Answered How to set left click for ContextMenuStrip for datagridview cell or row ?

    I have tried following code for DataGridView1_MouseClick event. Private Sub DataGridView1_MouseClick(sender As Object, e As MouseEventArgs) Handles DataGridView1.MouseClick If Button Is the left button Then ContextMenuStrip1.Show() End If End Sub but it give error...
  18. R

    Answered How to set left click for ContextMenuStrip for datagridview cell or row ?

    Hello, I am making a small project on Invoice. I have a datagridview for Adding, Editing and Deleting products. For Adding there is a Button. For Editing and Deleting products I have made a ContextMenuStrip1. The ContextMenuStrip1 is operated when someone select the cell of datagridview and...
  19. R

    how to transfer data to two different tables in one single query

    Hello, I have a table named TblInvoice which have following columns. InvoiceID(Primary key), DateofSale, CustomerID, SaleType, TypeofSale. For transferring data to this table the code is con.Close() Try con.Open() If MsgBox("Save Data to database ?", vbYesNo +...
Back
Top