Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
87% Quality Score
Upvotes Received
18
Posts with Upvotes
18
Upvoting Members
9
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
2
6 Commented Posts
4 Endorsements
Ranked #397
Ranked #630
~44.8K People Reached
About Me

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
Favorite Forums

56 Posted Topics

Member Avatar for mattwagner

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 …

Member Avatar for adam_k
0
7K
Member Avatar for kothaisaravan

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() ' ' …

Member Avatar for ruchirahuldoshi
0
2K
Member Avatar for ng5

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]

Member Avatar for Phasma
0
129
Member Avatar for leyla

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 …

Member Avatar for leyla
0
359
Member Avatar for Farhan_B

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 = …

Member Avatar for Phasma
0
151
Member Avatar for timosoft

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

Member Avatar for timosoft
0
485
Member Avatar for neh555

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]

Member Avatar for Phasma
0
82
Member Avatar for LearnVBnet

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.

Member Avatar for LearnVBnet
0
140
Member Avatar for senbaris

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.

Member Avatar for senbaris
0
1K
Member Avatar for easygi

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]

Member Avatar for easygi
0
445
Member Avatar for F_M

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.

Member Avatar for Phasma
0
676
Member Avatar for choosechrist

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, …

Member Avatar for pROKO
0
453
Member Avatar for ndraycott

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.

Member Avatar for Phasma
0
116
Member Avatar for madao

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 …

Member Avatar for kingsonprisonic
0
266
Member Avatar for anuradha1
Member Avatar for tenorjazz

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 …

Member Avatar for Phasma
0
1K
Member Avatar for sw8revenge

Have a read of the following [URL="http://www.vbforums.com/showthread.php?t=427059"]http://www.vbforums.com/showthread.php?t=427059[/URL]

Member Avatar for artemix22
0
231
Member Avatar for jigarsangoi

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 …

Member Avatar for Phasma
0
129
Member Avatar for LearnVBnet

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]

Member Avatar for LearnVBnet
0
265
Member Avatar for M.Waqas Aslam

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. …

Member Avatar for codeorder
0
1K
Member Avatar for sajil123

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]

Member Avatar for sajil123
0
2K
Member Avatar for sigridish

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 …

Member Avatar for sigridish
0
680
Member Avatar for shann1718

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]

Member Avatar for Phasma
0
160
Member Avatar for tomexlfc

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]

Member Avatar for artemix22
0
522
Member Avatar for Poongundran
Member Avatar for PutingPanday

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 …

Member Avatar for codeorder
0
323
Member Avatar for Mike Bishop

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> ''' …

Member Avatar for Phasma
0
2K
Member Avatar for nomorelogic

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 …

Member Avatar for nomorelogic
0
196
Member Avatar for mpooley

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]

Member Avatar for mpooley
0
84
Member Avatar for aishapot

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 …

Member Avatar for aishapot
0
2K
Member Avatar for anc6802

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]

Member Avatar for anc6802
0
304
Member Avatar for Phasma

[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 …

Member Avatar for Phasma
0
1K
Member Avatar for flywheeljack

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] …

Member Avatar for Reverend Jim
0
101
Member Avatar for kothaisaravan

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 …

Member Avatar for kothaisaravan
0
5K
Member Avatar for jtodd

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]

Member Avatar for jtodd
0
3K
Member Avatar for mitchie06

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 …

Member Avatar for Phasma
0
94
Member Avatar for ananth3125

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]

Member Avatar for Phasma
0
299
Member Avatar for markdean.expres

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 …

Member Avatar for Phasma
0
674
Member Avatar for AquaNut

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 …

Member Avatar for Phasma
0
1K
Member Avatar for bukk123

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 …

Member Avatar for Phasma
0
587
Member Avatar for sackymatt

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 …

Member Avatar for Pgmer
0
2K
Member Avatar for Ehtesham Siddiq

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 …

Member Avatar for adam_k
0
287
Member Avatar for markdean.expres

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 …

Member Avatar for markdean.expres
0
132
Member Avatar for Plantcode

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]

Member Avatar for Plantcode
0
251
Member Avatar for Ruchi224

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.

Member Avatar for Phasma
0
70
Member Avatar for mishphar

See this thread >>> [URL="http://www.daniweb.com/software-development/vbnet/threads/380681"]http://www.daniweb.com/software-development/vbnet/threads/380681[/URL]

Member Avatar for Phasma
0
353
Member Avatar for Ruchi224

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 …

Member Avatar for Phasma
0
610
Member Avatar for dwinn

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

Member Avatar for dwinn
0
140
Member Avatar for sidyusuf

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.

Member Avatar for Phasma
0
118
Member Avatar for khentz

khentz, I'm curious which are you wanting to fill ListView or ListBox? You're title say one and your question says another. Ken

Member Avatar for Techyon
0
124

The End.