Search:
Type: Posts; User: Mike Storm
Search:
Search took 0.05 seconds.
-
Can you post the code you used, i m not understanding something.
-
Hi, i dont know what you mean by doing it like Mike sugested but keep in mind that in your case will be better to use post #20 JMC sample code.
As i mention before i set DBNulls to default values...
-
I dont work in Access for a long time, in a quick research it seems it does not has null(seems) but it does has required, that will be about the same thing.
-
You got a point there, i had already edited the post and typed undeneit it
I use does couse i have the habit of set default values when is a dbnull or set it as empty string, in the case of...
-
And also if in your dataset you have the property Allow null as true but in your database its set to do not allow dbnull, it will still trow you a exception.
-
You cant pass DBNull as string/Integer or what ever, couse DBNl its like the field does not exists, its a "Vacuum" spot.
So in order to handle a DBNull field you will need to validate if it is...
-
Have a look:
152681
This is SQL, but Acces wont be that diferent i belive.
152683
Now, if your issue is that the field does not allow DBNUll, you need to make sure you set bouth cases(in the...
-
Either on the dataset, or in the database itself, or in bouth.
-
Have a look on this:
https://msdn.microsoft.com/en-us/library/system.dbnull.value(v=vs.110).aspx
See it as vacuum field.
-
You need to see if it is supoused to return a DBNull value on that field, and if not why it is doing it.
Now here are 2 ways to handle DBNull values:
'Option one
...
-
I belive your issue is that you trying to pass a DBNull Value, meaning the source field is empty and never had a value, right?
-
-
I was thinking there where a a problem with the fill.
-
I dont understand very well what 4 fields do you refear to?
-
I have no idea what may be actualy cousing that, first i would do would be set visible all datagridview columns and see its values.
-
I have no ideia about that one, but if you add a databound datagridview to a form and leave the autoincrement primary key visible, while you dont save the data you will see that the auto increment...
-
If the -1 value is the return of the Indexkey/Primary Key then you hgetting the index of a new row that has not been yet saved.
Means your table has no rows, either couse you not filling it, or the...
-
I dont understand why you in you first post you fill TblChangeApproveTableAdapter, i guess that code will be under some other event like form load, and then you fill TblChangeApproveTableAdapter ...
-
I m not understanding, and i dont have VS here now, can you post the exception message?
-
Explain:
Is the exception trown under the doubleclick event or under RemoveApprover?
-
Inside of the try catch or out of it should trow you the exception anyway
-
Replace column index by column name
glbintIDNum = CInt(Me.dgvSignList.Rows(e.RowIndex).Cells("ColumnName here").Value)
also you should check if the value is not dbnull
-
What does happen, does it gives you a exception?
-
First you wanna make sure you clicking a valid row and not the column headers:
Private Sub dgvSignList_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles...
-
Can you post the rest of the code you use to remove the aprovern including the event and the methode?
-
CStr and then .Value.ToString, no need!!
I would use just CStr, .ToString provides you with a exception if the value is dbnull.
glbstrName = CStr(Me.dgvSignList.Rows(e.RowIndex).Cells(5).Value)
-
Hi,
I have seen this happening in VS 2017 Community working with inherited controls like TabControl, or also if using usercontrols, but its more frequent when you add a databound control by drag and...
-
lets see what he explains about his problem, the way i initialy interpretate it was that the column in the excel file had format "MM / dd / yyyy" and on the DB "dd / MM / yyyy". but as i mation...
-
I belive his issue is that he gets the Date with a US format, but he needs to store it in a database that has a diferent regional setting.
He can use something like this to get the date converted to...
-
Have a look on this:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim DATE_ As Date = Now.ToShortDateString
Dim C_US As New...
-
Yeap, thats another option... i wasn't making a critic, i was just alerting him that the window did open in the mdi container, he just didnt see it couse of its location.
-
Hi, i had a look on to pclement code and it works with Option Explicit OFF and with Option Explicit On you will have to change for this:
Process.Start("F:\dv_aspnetmmc.chm")
...
-
You right, but only when you set its value, once it loses focus by default will become white again.
Another option to prevent it of ever be highlighted is to set DropDownStyle = DropDownList,...
-
a way to check that is to add a new combo, bind it to the same value as the "Where used" for exemple, and do not add any other code, ans see what it does.
As for the fact that you like to style...
-
Keypreview will not solve that issue, was just to give u a exemple that its not TABStop that is doing that.
Is there any code seting the value of does combos?
-
Another way to test that, and as a wild guess what i think is happening there is that somewhere in you code you are setting the value of does combos using...
-
It will be related to your code or propertyes set in the property window, i use tabstop on mine, actualy my forms normaly have KeyPreview set to true, and i supress Enter key and use send key {TAB},...
-
Hi, this is a weird one....
I wonder if HideSelection in the textboxes proprety window its set to false?
-
Have a look on this:
Public Sub TestThis_Show_QSOs_In_Selected_Country(sBand As String, sCountry As String)
Dim dt As New DataTable
-
And the link i posted https://imgur.com/a/upImb , you have to uncheck that to be able to change the datatypes.
And im off for today, just finish what i was doing, enjoy your reading
|
Click Here to Expand Forum to Full Width
|