16,010,392 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by K3JAE (Top 24 by date)
K3JAE
12-Nov-17 13:23pm
View
OK, Thank you for that. I can adapt the SQL statement using parameterized statements, after I get this working properly, then will convert that over as I also agree it makes it a bit neater and compact.
I am not sure how to pass the date then without using a string?
I am using MSSQL as my DB.
K3JAE
6-Jun-17 16:53pm
View
Would more page code possibly assist? I truly am wondering if I am doing something completely wrong here. I want to bring back results based on REPAIR DATE instead of ID? Therefore I need to figure out how to do that properly.
K3JAE
2-Jun-17 4:54am
View
Any luck with resolving my issue? I still cannot seem to get the REPAIR_DATE to show in my results off my search. Just asking as a reminder.
K3JAE
29-May-17 15:00pm
View
Re Item 1: At your suggestion: Removed the .ToString method.
Item 2: Made suggested change, thanks for that piece of info. Good to know.
Re the original question: I am not fully sure, or understand what you are referring to when you say: "You have to refer to REPAIR_DATE field in according procedure." I thought I had done this previously but with no luck. Can you be a bit more specific with what you are suggesting?
I am looking for the result of any search to come back only with a Date of Repair (list of dates if multiple returns on the search criteria). Currently I am coming back with only a Record ID or IDs.
I do appreciate your help. As I'm sure you can obviously tell, I am not a very proficient coder and still learning new things daily.
K3JAE
1-Oct-16 18:26pm
View
I never once claimed to know debug - I was just giving values that the program, in debug mode, was working with. I have tried the above but my coding skills are not that great.
I am only trying to figure out where in the form itself or in the formatting of data being imported is the problem. I am by far no equal to the helpers on this forum nor even in the same building. My coding skills are beginner class at best.
My question would be... where would the formatting be in error? I have used your method earlier. I tried declaring the values as "Double" as someone else suggested with no success.
I guess, the initial reason for asking this question was not to be beaten over the head for my incompetence or ignorance but to further learn and understand where and what to look at for related to my problem. I truly have tried to resolve this prior to posting to avoid being reminded how incompetent I really am at coding but since I could not resolve it after 24+ hours I took the chance and I asked.
FYI - I did resolve my issue and it was nothing to do with the formula or the formatting of same. The issue was I have a combobox defaulting to "No" at loadform which the formula checks. It looks to see if it is "No" but evidently setting it as default at loadform does not see the value of No. I am sure I am not explaining this properly but suffice it to say, I did indeed resolve my calculation issue on my own, which in reality never was a calc issue.
K3JAE
1-Oct-16 16:02pm
View
I have made all the appropriate changes as you suggested and yet still I get the same result. Is it possible something is amiss on my form formatting?
I gave only a snippet of the info as this is being done 6 times so there are multiple variables - ie tbTrkGalsPurch1, tbTrkGalsPurch2 ... tbTrkGalsPurch6 - tbPumpCost1, tbPumpCost2 ... tbPumpCost6 and so on.
I have a LIVE screenshot for you to look at and maybe this will determine my issue... I have it in Debug with the variables showing that the calculation is working with. Each shows an end result of $0.00. If interested please see http://www.k3jae.com/ScreenShots/ScreenShot-Fuel.gif and hopefully this will further cement my issue. This is based off LIVE data and where you see r1 and r2 showing a "0") there is actually a dollar amount in place but it is not reading it in properly.
K3JAE
1-Oct-16 14:19pm
View
OK, so then what or where should I be looking to locate my problem if the formula calculation is correct? Any hints?
K3JAE
9-Sep-16 17:39pm
View
Since I am a poor programmer - just learning - this is not real helpful. I am not even sure how to start this process let alone do it in C# then converting it.
K3JAE
9-Sep-16 9:48am
View
I am not using C#. I am using VB.NET. I want to incorporate this into my program where the user does not see this happen.
K3JAE
9-Sep-16 0:20am
View
This appears to be a solution to be ran under MSSQL and will not accomplish my end goal. This SQL inserts new rows into the table. I am not wanting to insert new rows but placing data from TABLE_A into a pre-existing, and currently blank column, within an existing row of TABLE_B.
I need to match PETS_LOAD_NUMBER of both Tables so the proper data of TABLE_A.COST_PER_MILE is inserted to the proper record of TABLE_B.COST_PER_MILE.
K3JAE
28-Aug-16 20:02pm
View
Using your code as a template I have successfully worked out the code to compare and correct.
I had to make one change in your code and that was the last line - resultDate as Date ...
Full line now reads: Dim resultDate As Date = CDate(sDateString.ToString)
I also deleted out the ConsoleWrite lines as they were not needed.
Thank you sincerely sir, for your assistance and guidance. Datetime conversions always tear up my brain and just cannot seem to get a handle on them!! Your links provided as well with your solution was also very helpful. Again appreciate the assist.
K3JAE
11-Aug-16 12:33pm
View
Thank you sir. I shall continue from this point forward using the "update question" button.
Whilst I have your attention... In my SQL database, I have all date fields set to datatype "date" and the fields for time set to datatype "time(7)". Would this be correct for the way the code posted above is?
Also note: that during the CSV import I am concatenating two fields to create the time... meaning I have two text boxes being imported, one for hours and one for minutes (due to the way PDF does things) and I put them together with a ":" between... as such:
tb01Time.Text = CDate(MyList.Items.Item(303)).ToString("MM/dd/yy") & " @ " & MyList.Items.Item(304).ToString & ":" & MyList.Items.Item(305).ToString
tb90Time.Text = CDate(MyList.Items.Item(337)).ToString("MM/dd/yy") & " @ " & MyList.Items.Item(338).ToString & ":" & MyList.Items.Item(339).ToString
--------------
For those who are following:
I have since did more testing and still have not resolved my issue. I am certain this is a database issue - datatype error. If I open any other form in my program all works fine. Only the one (main) page has the issue. It uses it's own DB and if I comment out the loadform line:
"Load_Info_TableTableAdapter.Fill(LoadInfoDataSet.Load_Info_Table)" the page loads fine. In debug placing a breakpoint on that line then stepping through it fails exactly on that line. Does not tell me why it fails and shuts down but nevertheless this is where it is happening.
I'm asking if someone can advise me the proper datatype settings for the data as listed in my default assignment section of the code. I have tried numerous data types and yet nothing is resolving the issue. I have attempted to change form date to datetime(7) as an example yet the issue remains.
Please can I beg for assistance? I must get this working as quickly as possible.
K3JAE
11-Aug-16 12:09pm
View
Again, I apologize for the "shouting." I was banging away at the keyboard and not paying attention to case. Please excuse my oversight.
K3JAE
11-Aug-16 12:07pm
View
I apologize for the caps in previous message. Was typing without watching.
FIRST: Line 812 is simply an import line specifically:
<pre>dpRcvrArriveDate.Text = MyList.Items.Item(347).ToString</pre>
SECOND: I have used debug with a breakpoint. The code cease at the following lines:
<pre>
Private Sub Load_Info_Form(sender As Object, e As EventArgs) Handles MyBase.Load
LoadForm = True
Load_Info_TableTableAdapter.Fill(LoadInfoDataSet.Load_Info_Table)
LoadInfoDataSetBindingSource.Position = LoadInfoDataSet.Load_Info_Table.Rows.Count - 1
'Setting Default Values
LoadInfoDataSet.Load_Info_Table.Columns("ACT_MILES_DIFF_CALC").DefaultValue = 0
LoadInfoDataSet.Load_Info_Table.Columns("ACTUAL_DH_MILES").DefaultValue = 0
LoadInfoDataSet.Load_Info_Table.Columns("ACTUAL_LOADED_MILES").DefaultValue = 0
LoadInfoDataSet.Load_Info_Table.Columns("ADJUSTED_MILEAGE").DefaultValue = 0
LoadInfoDataSet.Load_Info_Table.Columns("AGENT_FEE").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("ACT_MILES_DIFF_CALC").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("ARRIVE_DATE_01").DefaultValue = Date.Today
LoadInfoDataSet.Load_Info_Table.Columns("ARRIVE_DATE_90").DefaultValue = Date.Today
LoadInfoDataSet.Load_Info_Table.Columns("ARRIVE_TIME_01").DefaultValue = "00:00"
LoadInfoDataSet.Load_Info_Table.Columns("ARRIVE_TIME_90").DefaultValue = "00:00"
LoadInfoDataSet.Load_Info_Table.Columns("ARRIVE_EARLY").DefaultValue = "NO"
LoadInfoDataSet.Load_Info_Table.Columns("BOL").DefaultValue = "N / A"
LoadInfoDataSet.Load_Info_Table.Columns("BOL_WEIGHT").DefaultValue = 0
LoadInfoDataSet.Load_Info_Table.Columns("CLAIM").DefaultValue = "NO"
LoadInfoDataSet.Load_Info_Table.Columns("CLAIM_AMOUNT").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("DATE_PAID").DefaultValue = Date.Today
LoadInfoDataSet.Load_Info_Table.Columns("DEF_GALS_TOT").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("DEF_PURCHASED").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("DEPART_DATE_01").DefaultValue = Date.Today
LoadInfoDataSet.Load_Info_Table.Columns("DEPART_DATE_90").DefaultValue = Date.Today
LoadInfoDataSet.Load_Info_Table.Columns("DEPART_TIME_01").DefaultValue = "00:00"
LoadInfoDataSet.Load_Info_Table.Columns("DEPART_TIME_01").DefaultValue = "00:00"
LoadInfoDataSet.Load_Info_Table.Columns("DETENTION_PAID").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("DH_MILES_DIFF_CALC").DefaultValue = 0
LoadInfoDataSet.Load_Info_Table.Columns("DISPATCH_DATE").DefaultValue = Date.Today
LoadInfoDataSet.Load_Info_Table.Columns("DROP_CONFIRM").DefaultValue = "N / A"
LoadInfoDataSet.Load_Info_Table.Columns("DROPPED_EARLY").DefaultValue = "NO"
LoadInfoDataSet.Load_Info_Table.Columns("DROP_LOCATION").DefaultValue = "N / A"
LoadInfoDataSet.Load_Info_Table.Columns("EQUIP_WASHING_COST").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("EQUIP_WASH_REIMBURSE").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("EXTRA_PAY_RECEIVED").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("EXTRA_STOP_PICKUP_PAY").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("FAX_COST").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("FS_DIFF1_CALC").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("FS_DIFF2_CALC").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("FSA_DIFF1_CALC").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("FSA_DIFF2_CALC").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("FUEL_COST_AVG").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.Columns("FUEL_PROFIT_LOSS").DefaultValue = 0D
LoadInfoDataSet.Load_Info_Table.C
K3JAE
10-Aug-16 14:20pm
View
Mr Deeming has hit the problem - I had the Divide by "sign" backwards. DOH!!!
K3JAE
10-Aug-16 14:06pm
View
Apologize: I cut this out of the code... var a is included in the DIM f1-f6 statement so essentially add a to the DIM statement.
I will correct the code snippet above.
K3JAE
8-Apr-16 15:02pm
View
Correct, I remembered right before your last text came in and had it figured out and working. Thanks again. All good and happy now!! Have a great day!
K3JAE
8-Apr-16 14:53pm
View
One last item... If I wanted to change multiple textboxes as above, cannot remember how to add additional boxes without making more events...
Example, change tbLineHaulPaid AndAlso tbFuelSurchargePaid - Cannot remember how to add multiple items to the case.
K3JAE
8-Apr-16 14:40pm
View
EXCELLENT. That was it. I was going to ask if a "handle" was needed.
Kudos!!
K3JAE
8-Apr-16 14:28pm
View
I apologize as my coding skills are weak at best. I am not sure what you refer to by "Take a look at the control events, maybe the link between the code and the control has broken."
K3JAE
8-Apr-16 14:02pm
View
I changed the code to what you have above. Unfortunately this made no change to my tbLineHaulPaid background color when I changed the cbDroppedEarly to "yes."
Did I miss something?
K3JAE
8-Apr-16 14:01pm
View
Using the original code and changed as noted, still no luck. the tbLineHaulPaid when I choose YES in the combobox.
Question - does the tbLineHaulPaid box have to be a rich text box for this to work?
K3JAE
8-Apr-16 14:00pm
View
Apologize... Not real familiar with this board. I will correct next time.
K3JAE
7-Jan-15 11:24am
View
I am trying to move to a record in a dataset. I was trying to get the ID number of the record once it is found by searching for the Load Number - pass the ID number to the BindingNavigatorPositionItem which then takes me to that row in the dataset.
I cleaned my code a bot and have gotten this far with it. Only issue right now is that I must hit my "SEARCH" button 2 times for the code to work. ONCE the code does what it is supposed to do if I search another load number, hitting SEARCH button once, it then goes to the record. What is causing me to hit SEARCH twice on the initial usage of the search box but then only once afterwards?
I'm up for any new or different ideas.
Show More