200 Posted Topics

Member Avatar for jess99

[Code=vb] If radPackageA.Checked = True Then dblAmountDue = 9.95 If (dblHoursUsed > 10) Then dblAmountDue = 9.95 + (dblHoursUsed - 10) * 2.0 End If lblTotalAmountDue.Text = CStr(dblAmountDue) ElseIf radPackageB.Checked = True Then dblAmountDue = 14.95 ElseIf (dblHoursUsed > 20) Then dblAmountDue = 14.95 + (dblHoursUsed - 20) * 1.0 …

Member Avatar for jess99
0
3K
Member Avatar for scooby36

The equals sign is not the problem, its the method of retrieving your text from the combobox that changed. A combox item can have two values, the DisplayMember which is the text that is displayed as each item in the cbo and a hidden value can be assigned to each …

Member Avatar for TomW
0
164
Member Avatar for jess99
Member Avatar for Viwe

I think your making it more complicated on the front end then needs to be. As long as you can properly store each of this bits of info to the database, you should then be able to write a query to retrieve the info and calculate it at that time. …

Member Avatar for Viwe
0
162
Member Avatar for raymyster

I would suggest setting the column to not allow nulls and its default value to zero. Since this is an existing table you might first need to run an update statement to replace nulls with zero before making the table changes.

Member Avatar for TomW
0
155
Member Avatar for Kristofferson

Each of the string/text field values should be surrounded by single quotes in your update statement. However I would suggest changing this concatenated string to use parameters instead;. it will take care of not having to surrond the values in quotes and the database wont have to parse your statement …

Member Avatar for TomW
1
190
Member Avatar for Umarmai
Member Avatar for five01

Using the IndexOf method of an array that .[B]Net[/B] provides will save you from having to write tons of If comparisons and is much faster in its execution. [Code=VB] Sub Main() Dim arrVowels() As String = {"a", "e", "i", "o", "u"} Dim strSearchText As String = "Programming" Dim intVowelCounter As …

Member Avatar for TomW
0
99
Member Avatar for jacobenade
Member Avatar for xfrolox

The problem is that your trying to perform calculations on text values. You need to convert the text values to a numeric datatype. Even your last post would show as an error if you turned Option Strict & Option Explicit On. [Code] 'Convert the existing textbox value to an Int …

Member Avatar for TomW
0
122
Member Avatar for manoj_582033

You should start your own thread for new questions. But to quickly answer your question, you want to work with the underlying datasource that is connected to the datagridview. For instance if it is a datatable that is connected, you want to set the table with the boolean column to …

Member Avatar for TomW
0
191
Member Avatar for babbu

This is easy enough to accomplish but I would suggest against it since it would mean having to include a timer event that is constantly running throughout your program to update the time. As for adding your form name, add a status strip and on your status strip add a …

Member Avatar for TomW
0
123
Member Avatar for Nattynooster
Member Avatar for deepnu
Member Avatar for babbu
0
100
Member Avatar for xfrolox

Any part of this program your actually writing yourself? :) [URL="http://msdn.microsoft.com/en-us/library/wabtadw6.aspx"]How to: Create Application Settings Using the Designer[/URL]

Member Avatar for xfrolox
0
99
Member Avatar for x13120

You are correct there .Net does not offer control arrays. You can use control collections in coding to itterate through the controls on a form or in a container. [Code] For Each ctl As Control In Me.Controls If TypeOf (ctl) Is TextBox Then MessageBox.Show(ctl.Name) End If Next [/Code]

Member Avatar for TomW
0
177
Member Avatar for JRabbit2307

[Code=VB] Sub Main() Dim arrGrades(4) As Integer Dim intTotal As Integer = 0 'Get input For intIndex = 0 To 4 Console.Write("Enter the " & intIndex + 1 & " received grade: ") arrGrades(intIndex) = CInt(Console.ReadLine()) Next Console.WriteLine() Console.WriteLine("######################################") Console.WriteLine() 'Display Grades For intIndex = 0 To 4 Console.WriteLine("Grade {0} …

Member Avatar for TomW
0
112
Member Avatar for xfrolox
Member Avatar for xfrolox
0
4K
Member Avatar for xfrolox

Or in your project you can goto the properties window and click the checkbox that says "Make Single Instance application"

Member Avatar for xfrolox
0
146
Member Avatar for dre-logics

I'm not sure what is causing your datasource problem with crystal reports but just to offer an alternative suggestion... When I create a crystal report I dont even assign it to a datasource or database; instead I connect it to a dataset. Then in my program, I fill my dataset …

Member Avatar for TomW
-1
180
Member Avatar for xfrolox

Take a look at "StopWatch" in the help file. It has a nice example showing how to work with the StopWatch Class, TimeSpan object and how to format the hours, minutes & seconds for display. The above timer example is the opposite of what you want (counting elapsed time as …

Member Avatar for xfrolox
0
129
Member Avatar for babbu

By calling the AcceptChanges method on a Dataset and/or DataTable you are changing the rowstate of all the records to "Unchanged". Later when you call DataAdapter.Update method, it will do nothing because none of the records are marked as modified. Here's a quote I made in another [URL="http://www.daniweb.com/forums/thread222781.html"]post [/URL]a few …

Member Avatar for TomW
-1
110
Member Avatar for deepu08

[URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]Data Walkthroughs[/URL]

Member Avatar for TomW
0
82
Member Avatar for babbu

Your code shows only a select statement. You mention the problem is after adding a row but your not showing the code for adding the row or getting the new field after adding it. I dont have access installed to look at your db, not that i think that would …

Member Avatar for TomW
0
104
Member Avatar for ingbat

Have you tried stepping through the code in debug mode to make sure the event is actually firing with the expected parameter values and also that "ra" is returning a number stating whether or not any records were actually updated or not?

Member Avatar for ingbat
0
99
Member Avatar for jamesrobb

Your array is not actually zero length, it has a length of one! strFile is an array. The array can either be "nothing" or have at least one element to it; even if it is blank. strFile = strSubCommittees.Split("|") This will automatically assign at least one element to your array, …

Member Avatar for jamesrobb
0
113
Member Avatar for Jaysmi23

Just semantics/terminology but something to keep in mind, a datagridcontrol doesnt actually hold the data or connect directly to a database, you assign it a datasource such as a dataset/datatable etc... The underlying datasource is what you want to search & filter. To answer your actual question, take a look …

Member Avatar for Jaysmi23
0
289
Member Avatar for Alphard

I would have to disagree with the majority of the above reply. You should not be retrieving un-needed data from a database and holding it in memory. Write your query to get only the records that you need for this single user. [QUOTE=eliot;1010984] [COLOR="Green"] ' You do not need to …

Member Avatar for TomW
0
360
Member Avatar for TechSupportGeek

Set the size of the form to the screen bound sizes. You will also need an API call in order to hide the taskbar; google, vb.net & Hide Taskbar [Code] Me.Top = 0 Me.Left = 0 Me.Height = Screen.PrimaryScreen.Bounds.Height Me.Width = Screen.PrimaryScreen.Bounds.Width Me.FormBorderStyle = FormBorderStyle.None [/Code]

Member Avatar for TechSupportGeek
0
2K
Member Avatar for QuickBooksDev

Hello QBD, I understand your problem; unfortunately there is no easy solution. What you have to understand is like working directly in your database, any value changes you make to a cell dont truly take effect in that cell/record until you move to another record/row; at which time the new …

Member Avatar for TomW
0
942
Member Avatar for Nattynooster

Theres a much easier way; you can get rid of the text boxes and use NumericUpDown (NUD) controls instead. The NUD is the same as a textbox but it will only allow numbers to be input. You can also set the min & max numbers allowed and whether or not …

Member Avatar for TomW
0
133
Member Avatar for ShadowZ00

What exactly are you looking to have returned? (the entire line, the index of where the word starts etc) I can show you many different ways to search text but do you have a specific key word to search for? One example: [Code=VB] Private Function IsFileContainsSrting(ByVal SearchWord As String, ByVal …

Member Avatar for ShadowZ00
0
88
Member Avatar for ardent23

There is no need to query the database multiple times for the same student record every time they click on an option. Ardent, I would sugest starting by filling a DataTable with the (class) students you want to work with. Bind the Student Name to the DisplayMember of a Combobox …

Member Avatar for TomW
0
172
Member Avatar for ekonagu

[Code] COMND.CommandText = "UPDATE Tbl_Pat_Registration SET Pat_Name=@PPat_Name,Pat_ID=@PPat_ID where id=@Pid" .AddWithValue("@Pid", Id) .AddWithValue("@PPat_Name", Trim(CChar(txt_name.Text))) .AddWithValue("@PPat_ID", [COLOR="Red"]Trim(CChar(Txt_id.Text))[/COLOR]) [/Code] Is Id a numeric datatype,why are you converting it to a char? [Code] .AddWithValue("@PPat_ID", [COLOR="Green"]cInt[/COLOR](Txt_id.Text.Trim)) [/Code]

Member Avatar for TomW
0
525
Member Avatar for bryanhiehle

If your database is located on a web server, both your web page and your desktop application can connect to that database and use it.

Member Avatar for TomW
0
94
Member Avatar for dre-logics

The height of a status strip is a set size. If you add an object such as a label to your status strip and change the statuslabel's font size to 28 (Tahoma), the statusstrip controls height would then change to 50.

Member Avatar for TomW
0
442
Member Avatar for mania_comp

You want to round to a specific demicial position (not ceiling function). You havent mentioned how/where this value is being displayed/stored to show a specific example. In a database such as Sql Server, you can set the precision property of your decimal column to one, that will limit the values …

Member Avatar for TomW
0
172
Member Avatar for TomW

I have a Crystal Report which has a background made up to match a work form that needs to be filled out with data queried & processed from the database. The finished report has only five single field values and up to six detail records (three fields in each detail …

-3
141
Member Avatar for lolwtf

You can build crystal reports right in the visual studio software too without the need of purchasing any full seperate editions of crystal reports.

Member Avatar for TomW
0
174
Member Avatar for Umarmai
Member Avatar for murid

You can not update your interface from a background thread. However you can use the ProgressChanged event of a background worker to update progress status. There are some examples available for download and additional walkthrough examples available in the help file, just type in "BackgroundWorker Class"

Member Avatar for TomW
0
147
Member Avatar for PysKo

There is no limitation to the amount of items you can select in a checkedlistbox. This sounds more like something in your code that is causing this.

Member Avatar for TomW
0
151
Member Avatar for tripes

[URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]MSDN Data Walkthroughs[/URL]

Member Avatar for TomW
0
56
Member Avatar for maccyjam

[QUOTE=maccyjam;1005288]Hi, I am trying to make a quiz and i want it so, that if you get the correct answer you go to the next form and close the previous one but if not, it will make pop-up box that goes back to the question when pressed OK. Here is …

Member Avatar for TomW
0
92
Member Avatar for umairraja52

VB6 came out in 1998, why would you tell someone just starting out to start with a language that is obselete by a decade....

Member Avatar for Vineeth K
-1
246
Member Avatar for djmd60

Here are is a function I use, it will import an Excel worksheet into a dataset/datatable for you. After you get that much working, you can manipulate/format your data and then transfer it to your database. [Code=VB] 'Calling Sub Dim dtExcel As New DataTable dtExcel = ImportExcelIntoDataTable(YourFileName) 'Just to view …

Member Avatar for TomW
0
135
Member Avatar for Merovingian
Member Avatar for babbu

Sknake is right, you need to provide the error message for anyone to provide detailed help other then guessing at whatelse might be going on in your code. For instance, I do not see where you are opening the database connection although you may be doing that elsewhere in the …

Member Avatar for TomW
-2
182
Member Avatar for hussain3874

You can set the datatable to DefaultView and then use the RowFilter method, to only show the records that meet your filter critera. There is a general example below: [Code=VB] Sub ListBox1_SelectedIndexChanged If m_blnLoading = True Then Exit Sub With MyDataSet.MyTable.DefaultView Select Case FilterCritera Case Critera1 .RowFilter = "Column1 = …

Member Avatar for TomW
-1
93
Member Avatar for yorro

[Code] Set column2 =[COLOR="Red"]'C2sample1'[/COLOR] WHERE column2 = [COLOR="red"]'C2sample1'[/COLOR]" [/CODE] If Column2 already equals [COLOR="red"]C2Sample1[/COLOR], then your replacing the column value with the same exact value that your searching for.

Member Avatar for yorro
-1
98

The End.