- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 18
- Posts with Upvotes
- 18
- Upvoting Members
- 9
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 2
Someone who just likes computers and hates petty little ####s who who are only on this site to brag. I say #### YOU IN THE ###. I also wish to extend an invitation to the lame assed moderators on this site to ban me as I KNOW they are ### kissing douche…
- Interests
- That would also be none of your ####ing business.
- PC Specs
- None of your ####ing business
56 Posted Topics
Re: mattwagner, could you go to your MS Access table that you are trying to update/Insert to and copy/paste the Column names here? I am curious from reading your thread and the code samples, that you have column names with spaces in which case you will get the errors you are … | |
Re: From [URL="http://office.microsoft.com/en-us/excel-help/create-or-remove-a-drop-down-list-HP005202215.aspx"]http://office.microsoft.com/en-us/excel-help/create-or-remove-a-drop-down-list-HP005202215.aspx[/URL] The maximum number of entries that you can have in a drop-down list is 32,767 As for why your items are not showing up I'd check for a typo. Here is a simple macro I recorded for getting a dropdownlist of 212 items [CODE] Sub Macro3() ' ' … | |
Re: Try putting the save code in the Forms FormClosing Event. [CODE] Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing 'Do Save stuff End Sub[/CODE] | |
![]() | Re: 1. Do all your calculations using the appropriately typed variables? 2. Doing payroll calculations would in real life Never use integers they would be Decimal or Double types. 3. After the calculations are complete then concat your message to the user. [CODE] Dim TotalPayWithoutOvertime As Double Dim HoursWorked As Double … ![]() |
Re: This is a simple Delete query created in Access 2007. I do not believe you need the extra double quote you had in your original post or the single quotes I saw in another unless your user_id and role_id are strings and not integers. [CODE] Dim sql As String = … | |
Re: In the Solution Explorer click Show All Files, navigate to your .txt file, right-click on it, and select Include In Project. It will then be in your output | |
Re: Here's a primer for what you are asking>>> [URL="http://www.dreamincode.net/forums/topic/32392-sql-basics-in-vbnet/"]http://www.dreamincode.net/forums/topic/32392-sql-basics-in-vbnet/[/URL] | |
Re: Why not use this >>> [CODE]"SELECT tbl_Inventory.* INTO tbl_Inventory IN 'C:\Documents and Settings\User\Desktop\dbName.accdb' FROM tbl_Inventory;'" [/CODE] You could create a sub or function that receives the table names to copy all your tables to the new database. | |
Re: You could use an OpenFileDialog to select the file or list all the .txt files in the folder in a list/combo Box and select it that way. | |
Re: Are you wanting to do the following? [CODE] Dim thisDate As Date = #3/27/2010# Dim thisString As String = "3/27/2010" 'Add 7 Days MsgBox(thisDate.AddDays(7).ToShortDateString) MsgBox(CDate(thisString).AddDays(7).ToShortDateString) Dim newString As String = thisDate.AddDays(7).ToShortDateString Label1.Text = newString [/CODE] | |
Re: Run your code in debug, get the value of strsql and paste it into a query in Access,run the query and see what it tells you. | |
Re: Add two Booleans to your Global Variables set to False [CODE]Dim loaded As Boolean = False Dim txtChanged As Boolean = False[/CODE] Create a Sub to handle when any of the Text Boxes have a Text Changed event, say set a flag to true. [CODE]Private Sub Text_Changed(ByVal sender As Object, … | |
Re: Found this On DaniIWeb >>> [URL="http://www.daniweb.com/web-development/aspnet/threads/382491"]http://www.daniweb.com/web-development/aspnet/threads/382491[/URL] Looks like what you're after. | |
Re: The following should give you the exact ID of the Record that you last last Inserted. [CODE] Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ My.Computer.FileSystem.SpecialDirectories.Desktop & _ "\access.mdb;") Private Sub btnExecuteQuery_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExecuteQuery.Click Dim sql1 As String = "INSERT INTO Inventory_1(Item_Name,Item_Category_ID,Item_Storage_ID,Item_Package_Size_ID,Item_Count,Item_Price) VALUES('BEAR … | |
Re: Your Select query didn't include a Primary Key | |
Re: I created a simple update in an Access db and it had double quotes around my update values you may want to try that. [CODE]UPDATE MaxTime SET Container = "1111", Vehicle = "2222", Exterior = "3333", Interior = "4444"; [/CODE] Also You really should use a Where Clause unless you … | |
Re: Have a read of the following [URL="http://www.vbforums.com/showthread.php?t=427059"]http://www.vbforums.com/showthread.php?t=427059[/URL] | |
Re: From your question I take it you just want to print the recordset from your access query. There are many ways to do what you want. As I dislike playing with VS2008's reportviewer and for simple applications I feel the crystal reports is overkill. I use the following: [INDENT]1.Create a … | |
Re: If you used a [COLOR="red"]BindingSource[/COLOR] [URL="http://msdn.microsoft.com/en-us/library/fbk67b6z(v=vs.90).aspx"]http://msdn.microsoft.com/en-us/library/fbk67b6z(v=vs.90).aspx[/URL] between your dataset and dataGridView and And the[COLOR="Red"] Command Builder[/COLOR][URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommandbuilder(v=vs.90).aspx#Y0"]http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommandbuilder(v=vs.90).aspx#Y0[/URL] Your coding would be a lot less difficult. There are many examples of this on DaniWeb. [URL="http://www.daniweb.com/software-development/vbnet/threads/410402"]http://www.daniweb.com/software-development/vbnet/threads/410402[/URL] | |
Re: Hello waqasaslammmeo, I use the following function to move to the control I want on the Enter Press. You must set the KeyPreview Property of the form to True. You can set up a Select Case if you have more than one you want to test for and move to. … | |
Re: You either need to write your own Insert Command or use the CommandBuilder See the link below [URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommandbuilder(v=vs.90).aspx#Y0"]http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommandbuilder(v=vs.90).aspx#Y0[/URL] | |
Re: Hi sigridish, As Reverend Jim said you get 3 sheets for free when you create a new workbook. If you are going to use one of the sheets you must refer to it by index. Then when you need a different you select the sheet you want the data to … | |
Re: shan1718 Have a read of the following thread: [URL="http://www.daniweb.com/software-development/vbnet/threads/410402/1752227#post1752227"]http://www.daniweb.com/software-development/vbnet/threads/410402/1752227#post1752227[/URL] | |
Re: tomexlfc, Did you use a SELECT Command on your DataAdapter to fill your Dataset Table? After you make the Adapter.Fill(DataSet,Table) you can get the Update,Insert, and Delete Commands for your DataAdapter via the CommandBuilder. Here is a Good Example [URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommandbuilder(v=vs.90).aspx#Y0"]http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommandbuilder(v=vs.90).aspx#Y0[/URL] | |
Re: Poongundran, See word doc attached. It's dirty but it'll give you a starting point. | |
Re: Hi PutingPanday, I do not believe the Label control has any properties or methods to change the color of individual characters. You can kind of hack the richtextbox by shrinking it to the size that your text needs, change the background color to the color of its container, and set … | |
Re: Hey Mike, Give this a go. This was some VBA code I translated to VB.net [CODE] Option Strict On Option Explicit On Imports Excel = Microsoft.Office.Interop.Excel 'The worksheet you want the Last Row that has data. xlWkshtMain = CType(xlWkbNew.Worksheets(Index:=1), Excel.Worksheet) 'New Excel Application xlApp = New Excel.Application ''' <summary> ''' … | |
Re: I believe your Dataset Update Command should come before your DataAdapter Fill Command. You would be just refilling anything in the Database Table to the DataSet wiping out your record during runtime. That's why when you restart it shows up. [CODE] ds.Tables("tblCustomers").Rows.Add(dsNewRow) da.Update(ds, "tblCustomers") da.Fill(ds, "tblCustomers") [/CODE] I also do … | |
Re: Hey Mike, Try This>>> [CODE] Dim ds As New DataSet 'For ds.Tables(0) Dim Drow As DataRow = ds.Tables(0).Rows(1) [COLOR="Red"]Dim num As Double = CDbl(Drow(1))[/COLOR] [/CODE] | |
Re: There is a vb string method you can use when you are done with the textbox [CODE] Private Sub txtName_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtName.Leave Dim str As String = StrConv(txtName.Text, VbStrConv.ProperCase) txtName.Text = str End Sub[/CODE] If you want it to Capitolize your string as … | |
Re: anc6802, Set the Columns Visible Property to False for the columns you do not want your users to see. [CODE]DataGridView1.Columns(colNumber).Visible = False[/CODE] | |
[B]Read a CSV file into a DataGridView[/B] [CODE]'12/4/2011 'Code to read CSV file with headers using 'ACE.OLEDB.12.0 Connection 'The following is a Sampling of <EXTENSION.csv> 'The CSV file contains all the Extension on my Desktop Computer 'The full file has 923 Rows with Headers: 'EXTENSION,DESCRIPTION,EXECUTABLE_PATH '.mde,Microsoft Office Access MDE Database,C:\Program … | |
Re: You need to use a Function that returns the type you want. [URL="http://www.homeandlearn.co.uk/net/vbnet.html"]http://www.homeandlearn.co.uk/net/vbnet.html[/URL] [CODE] Private [COLOR="Red"]Function[/COLOR] DateCalc(ByVal duedate As Date)[COLOR="Red"] As Date[/COLOR] Dim Span As TimeSpan Dim Day As Integer Span = Now.Subtract(duedate) Day = Span.Days MsgBox(Day) [COLOR="Red"]Return Day[/COLOR] End Function[/CODE] Use it like this [CODE] INFDateLabel1.Text = CStr(DateCalc(Duedate)) [/CODE] … | |
Re: Hi kothaisaravan, 1. I'm sure that the file name you return from your dialog is not empty/nothing. So check that it isn't the short path. You cannot use the short path for a file say in your StartUp folder with Excel ex. 'workbook.xlsx'. Excel requires the full path to the … | |
Re: Here's the code in VB. [CODE] Dim ds As New DataSet Dim AccessConn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=access.mdb;") Dim sql As String = "Your_Query" Dim AccessCommand As New OleDbCommand(sql, AccessConn) Dim da As New OleDbDataAdapter(AccessCommand) da.Fill(ds) DataGridview1.DataSource = ds.Tables(0)[/CODE] | |
Re: Question 1 would be Why would you want to put 20 tables in a DatagridView at one time? You can 'Join' the tables in your sql query to get the fields of all 20. You can query each table creating a different datatable totaling 20 in the dataset and switch … | |
Re: The code you provided just sets column and header properties for the datagridview. You need to create a dataset/datatable and set the datatable as the source for your datagridview. You might want to check out my Oct. 14 post on this thread >>> [URL="http://www.daniweb.com/software-development/vbnet/threads/385157/1660701#post1660701"]http://www.daniweb.com/software-development/vbnet/threads/385157/1660701#post1660701[/URL] | |
Re: markdean.expres, Yes it is. I converted pieces of C# code I found on the net to this class. It does nothing except open the Files' Right-Click Properties Dialog window. As far as reading and writing to and from it I think M$ is keeping it a secret or we need … | |
Re: From first glance you created a DataView from the table and then you sorted it. The row order in the dataview will not match the row order in the original table. So you are searching the dataview for the Index only to use the index with the original table. Why … | |
Re: You can use the Split method of String: Read this [URL="http://www.dotnetperls.com/split-vbnet"]http://www.dotnetperls.com/split-vbnet[/URL] 'You will need a String Array to hold the names ' [CODE] Private Sub ComboBox1_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectionChangeCommitted If ComboBox1.SelectedIndex <> -1 Then Dim names() As String = ComboBox1.SelectedItem.ToString.Split(New Char() {" "c}) TextBox1.Text … | |
Re: The the following will explain the Right-Click DataGridView part be sure to read both replies; [URL="http://bytes.com/topic/visual-basic-net/answers/425607-datagridview-force-row-selection-right-click"]http://bytes.com/topic/visual-basic-net/answers/425607-datagridview-force-row-selection-right-click[/URL] Then in your Right-Click event you can: [CODE] For Each row As DataGridViewRow In DataGridView1.SelectedRows DataGridView1.Rows.Remove(row) Next [/CODE] If your DataGridView is bound to a BindingSource which in turn has it's DataSource set to … | |
Re: What version of EXCEL are you using and what is your database? That said you could dump the excel sheet and Database Table into a dataset and do the compare from there. That will require fewer trips to the DB and EXCEL. Then only add the ones that are unique … | |
Re: Add a reference to Microsoft.Office.Interop.Word Open the word doc and save it as a text file. Then load the text file into the RichTextBox. [CODE]Imports Microsoft.Office.Interop Public Class Form1 Dim appWord As New Word.Application Dim docWord As New Word.Document Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles … | |
Re: Your file extension for the access database should be .mdb not .mbd I'd start there. Also there should be no space after the semicolon. I also never have a space before or after my equal sign. Try the following: [CODE]Dim con as New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=pract.mdb")[/CODE] | |
Re: Set the DataGridView's AllowUserToAddRows property to False. [CODE]DataGridView1.AllowUserToAddRows = False[/CODE] Then you will only show the returned rows from the Data Source. | |
Re: See this thread >>> [URL="http://www.daniweb.com/software-development/vbnet/threads/380681"]http://www.daniweb.com/software-development/vbnet/threads/380681[/URL] | |
Re: Ruchi224, You will need to use a DataSet, BindingSource, OledbDataAdapter with a SelectCommand, and OledbCommandBuilder for the DataAdapter. Then use the OledbDataAdapter Update Method to reflect your changes back to the datatable in the MSACCESS database. If you fill the dataset using the dataAdapter and set the BindingSource's DataSource to … | |
Re: Hey Dan I have accomplished this and will post if you or anyone wants or cares. I know this post has been here a long time and it seems as if it is being overlooked or maybe well ...... Ken | |
Re: Maybe you could just set the read-only property of the columns you don't want the user to mess with Like >>> [CODE]Me.DataGridView1.Columns(colNum).ReadOnly = True[/CODE] Try this page. [URL="http://www.dotnetcurry.com/ShowArticle.aspx?ID=132"]http://www.dotnetcurry.com/ShowArticle.aspx?ID=132[/URL] It explains some good datagridview examples. | |
Re: khentz, I'm curious which are you wanting to fill ListView or ListBox? You're title say one and your question says another. Ken |
The End.