Community Member
Member Avatar
When i run the statement below i am getting a number of xxx.xxxx can anyone help me change this to two DP?

(SELECT sum(oht_net) FROM order_header_total
JOIN order_header ON oh_id = oht_oh_id
WHERE oh_cd_id = cd_id AND oh_sot_id = 1 AND DATEPART(yyyy, oh_datetime) = (SELECT DATEPART(yyyy, GETDATE()) -1)) Topic by Mike Bishop in Databases
sql
Member Avatar
When i run the statement below i am getting a number of xxx.xxxx can anyone help me change this to two DP?

(SELECT sum(oht_net) FROM order_header_total
JOIN order_header ON oh_id = oht_oh_id
WHERE oh_cd_id = cd_id AND oh_sot_id = 1 AND DATEPART(yyyy, oh_datetime) = (SELECT DATEPART(yyyy, GETDATE()) -1)) First Post in Topic by Mike Bishop in Databases
sql
Member Avatar
I have two forms

the first FrmRecipe.vb form has all my calulations and functions in it
the second FrmReports has a crystal report viewer with loads of reports.

I am trying to call the report as a thread so that the main from is still working however when the treads … Topic by Mike Bishop in Software Development
Member Avatar
Mike Bishop -3 Replied To a Post in Multithreading - Invoke/BeginInvoke
I have two forms

the first FrmRecipe.vb form has all my calulations and functions in it
the second FrmReports has a crystal report viewer with loads of reports.

I am trying to call the report as a thread so that the main from is still working however when the treads … First Post in Topic by Mike Bishop in Software Development
Member Avatar
I am importing data from excel into datagridview its kind of working fine.
my data is like this in excel


10001 MR NEW
10002 MR OLD
10003 MR CLEAN
1MB21 MR DIRTY
1BA12 MR DIXON
1EA12 MR RYDER



When I load the data all is loaded untill it gets to … Topic by Mike Bishop in Software Development
Member Avatar
Topic by Mike Bishop in Software Development
Mr M

Resolved thank you for pointing out the obvious, I have been looking at the code that long
that I hadn't spotted it. although that wasn't was resolved it.

I added the performstep process into a thread



Private Sub FrmPleaseWait_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load



'Dim x … Reply by Mike Bishop
Member Avatar
Topic by Mike Bishop in Software Development
Thanks Mr M

just a bit more info the form is a MdiChild form open within the parent
I have already tried the code you sugested however the form is still open
within my parent. (See attachment)



Public Class FrmPleaseWait

Private Sub FrmPleaseWait_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load … Reply by Mike Bishop
Member Avatar
Topic by hallianonline in Software Development
convert the text to a number

`If NumericText ({field}) then ToNumber ({field}) else 0`

you may also have to do a calulation to make it into a decimal number Reply by Mike Bishop
Member Avatar
Topic by buffdaemon_live in Software Development
What i do in this case is use a datagrideview and make it behave like a combo box.
I set the datagridview to one coloum in width, and when you select your required
option use the datagridview row click option to bring back the data you require Reply by Mike Bishop
Member Avatar
I have a form with only 1 object on it , a progress bar.

when the form loads it runs the progress bar, which is working fine.

when the progress bar hits the max vaule i want the form to close but
no matter where i put the me.close the … Topic by Mike Bishop in Software Development
Member Avatar
I have the folling code which imports my CSV file into the respective columbs on my datagridview
I would like to clean the string by removing any " from the string before populating the datagridview.

can anyone point me in the right direction please?







Dim newstring As String = Nothing … Topic by Mike Bishop in Software Development
Member Avatar
Mike Bishop -3 Marked Solved Status for help with Select Case
I am trying to calculate days between two dates so that I can find out if they fall in the 30 / 60 / 90 day bracket
The calculation I am using is working fine

` DATEDIFF(day, dbo.TblReturnDetails.RcvdDate, { fn NOW() })`
what I am trying to do now is … Topic by Mike Bishop in Databases
Member Avatar
Mike Bishop -3 Replied To a Post in help with Select Case
Topic by Mike Bishop in Databases
perfect thank you Reply by Mike Bishop
Member Avatar
Mike Bishop -3 Replied To a Post in help with Select Case
Topic by Mike Bishop in Databases
i have now changed to


CASE WHEN DATEDIFF(day , dbo.TblReturnDetails.RcvdDate , { fn NOW() }) > 60 THEN '3' WHEN DATEDIFF(day , dbo.TblReturnDetails.RcvdDate , { fn NOW() }) > 30 THEN '2' END


but need to add when <30 then '1'

199 3
55 2
29 NULL
17 NULL

can … Reply by Mike Bishop
Member Avatar
I am trying to calculate days between two dates so that I can find out if they fall in the 30 / 60 / 90 day bracket
The calculation I am using is working fine

` DATEDIFF(day, dbo.TblReturnDetails.RcvdDate, { fn NOW() })`
what I am trying to do now is … Topic by Mike Bishop in Databases
Member Avatar
Featured Mike Bishop -3 Replied To a Post in char replace function
Topic by Mike Bishop in Web Development
like so?


1.$str = trim($str);/*remove any unwanted outer spacing*/
2.$urlkey = preg_replace("/[^0-9a-zA-Z]+/","-",strtolower($str));
urlkey = str_replace( ",", "", $str );
3.$htmlkey = ($htmlext) ? $urlkey.".html" : "";
4.return array($urlkey,$htmlkey); Reply by Mike Bishop
Member Avatar
Featured Mike Bishop -3 Created char replace function
can anyone help me with the code below, I would like to strip out comas from the URL

http://www.balmanltd.co.uk/products/steering/ball-joints/ball-joint,-drag-link-end/am1148



$str = trim($str);/*remove any unwanted outer spacing*/
$urlkey = preg_replace("/[^0-9a-zA-Z]+/","-",strtolower($str));
$htmlkey = ($htmlext) ? $urlkey.".html" : "";
return array($urlkey,$htmlkey); Topic by Mike Bishop in Web Development
Member Avatar
Featured Mike Bishop -3 Replied To a Post in datagridview select multiple rows
Topic by Mike Bishop in Software Development
cgeier thats exactly what i was looking for, thank you so much.

PS do you have any code for the mind reading scenario? Reply by Mike Bishop
Member Avatar
Featured Mike Bishop -3 Marked Solved Status for datagridview select multiple rows
I have a datagridview with 10 rows I can select mutiple rows by using Ctrl & Mouse click
but what I would like to do is use a button to select the row.

I.E the user could select row one, click the button and row one would be selected
then … Topic by Mike Bishop in Software Development
Member Avatar
Mike Bishop -3 Replied To a Post in What do I do next! Please help
Topic by Traffkk in Software Development
c++
Hello world Reply by Mike Bishop
Member Avatar
Featured Mike Bishop -3 Replied To a Post in datagridview select multiple rows
Topic by Mike Bishop in Software Development
i will try the mind reading way, but not sure how to code it in .net..

the user will select the row using the mouse. then use the button.

what i am trying to do it select a few rows with out the need to use Ctrl & mouse click. … Reply by Mike Bishop
Member Avatar
Topic by akkbkht in Software Development
have you tried turning UAC (User Access Control) off?
Start > Search > UAC Reply by Mike Bishop
Member Avatar
I have a datagridview with 10 rows I can select mutiple rows by using Ctrl & Mouse click
but what I would like to do is use a button to select the row.

I.E the user could select row one, click the button and row one would be selected
then … Topic by Mike Bishop in Software Development
Member Avatar
I have data already populated in a datagrid
I have three textbox txtCustomername, txtPartcode, txtinvo

I want the user to be able to input text into the txtcustomername text box which will result in the datagrid only showing the rows that relate to that customer. Then I want the user … Topic by Mike Bishop in Software Development
Member Avatar
Mike Bishop -3 Replied To a Post in Crystal reports problem
Topic by Nebil in Software Development
I assume that you they are diffrent Details sections on your report? Reply by Mike Bishop