200 Posted Topics
Re: [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 … | |
Re: 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 … | |
Re: 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. … | |
Re: 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. | |
![]() | Re: 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 … |
Re: 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 … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]Data Walkthroughs[/URL] | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]Data Walkthroughs[/URL] | |
Re: 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] | |
Re: 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] | |
Re: [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} … | |
Re: You can embed the wav files into your project by adding them to the project Resources. | |
Re: Or in your project you can goto the properties window and click the checkbox that says "Make Single Instance application" | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]Data Walkthroughs[/URL] | |
Re: 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 … | |
Re: 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? | |
Re: 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, … | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [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] | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
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 … | |
Re: You can build crystal reports right in the visual studio software too without the need of purchasing any full seperate editions of crystal reports. | |
Re: MessageBox.Show(Now) | |
Re: 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" | |
Re: 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. | |
Re: [URL="http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx"]MSDN Data Walkthroughs[/URL] | |
Re: [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 … | |
Re: VB6 came out in 1998, why would you tell someone just starting out to start with a language that is obselete by a decade.... | |
Re: 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 … | |
Re: [Code=VB] DateTimePicker1.Value = Now.AddHours(2) [/Code] | |
Re: 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 … | |
Re: 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 = … | |
Re: [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. |
The End.