-
Sep 30th, 2022, 08:39 AM
#1
Thread Starter
New Member
Cell Can't Be Empty
Hello,
Attached is an example of the problem.
I have a table (form2) where I enter a value in 3 cells and through a calculation the total is displayed in a datagrid view (Form1). The calculations works but:
- If I don't enter anything in 1 cell, I get no value.
- if I want to empty 1 cell (no value) this does not work, the cell cannot be empty, however it is set with "Allow Nulls"
I suspect this is due to the calculation, but is there a possibility to empty the cell and get a calculation?
-Moderator Action: Attachment Removed-
Last edited by dday9; Sep 30th, 2022 at 09:19 AM.
-
Sep 30th, 2022, 09:09 AM
#2
Re: Cell Can't Be Empty
I removed the attachment because it included the executable.
Besides, rather than uploading your entire project and asking us to sift through it, why don't you copy/paste the relevant code? You could even use [code]' my code here[/code] tags to keep the formatting.
-
Oct 3rd, 2022, 06:22 AM
#3
Thread Starter
New Member
Re: Cell Can't Be Empty
i load the view (form1) with
Code:
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.ViewTableAdapter.Fill(Me.TestDataSet.View)
End Sub
save the table (form2) with
Code:
Private Sub TableBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles TableBindingNavigatorSaveItem.Click
Me.Validate()
Me.TableBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.TestDataSet)
End Sub
calculate the total with
Code:
CREATE VIEW [dbo].[View]
AS
SELECT prijs1 + prijs2 + prijs3 as totaal
FROM [Table]
attached a small example without executables test.zip
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|