Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
56% Quality Score
Upvotes Received
3
Posts with Upvotes
2
Upvoting Members
3
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
2 Commented Posts
0 Endorsements
Ranked #2K
~15.3K People Reached

38 Posted Topics

Member Avatar for mikeybware

I currently have some code that gets the overall top 25 frame sales, which is as follows: `Dim FrameCountSelectStr As String = "SELECT TOP 25 Count(Glasses.OrderID) AS GlassesCount, Glasses.Manufacturer, Glasses.FrameName FROM(Glasses) WHERE FrameName <> '' AND OrderDate >= #" & SearchDateStart & "# AND OrderDate < #" & SearchDateEnd & …

Member Avatar for Reverend Jim
0
323
Member Avatar for wilsonchama

I would try changing this line `Using cmd As New SqlCommand("SELECT * " & " FROM tblTimesheet " & " WHERE EmpNo=@empno", MyConnection)` to `Using cmd As New SqlCommand("SELECT * FROM tblTimesheet WHERE EmpNo='" & @empno & "'", MyConnection)` where there are single quotes around your variable, since it is …

Member Avatar for mikeybware
0
198
Member Avatar for Titty_1

Have you tried referring to the datagrid column by name in case it is not cell(3): `grdView.Rows(0).Cells("chbSelect").Value = True` If you prefer to use the column number, please remember that the first column is usually Cells(0). You may already know that but I am trying the obvious answers first :)

Member Avatar for mikeybware
0
154
Member Avatar for mikeybware

I am currently developing in Visual Studio 2008 (Visual Basic) and I have no problem reading, editing, saving, etc. to a 2007 Access database that is stored locally using the following code: [CODE]Dim NotifyDS As New DataSet() Dim NotifyCon As New OleDb.OleDbConnection NotifyCon.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Data\Settings.accdb" NotifyCon.Open()[/CODE] Ultimately I am …

Member Avatar for xrjf
0
3K
Member Avatar for Cj_4

It could be the data type of some of your database fields. For instance you have fields called months, days, years ,age, etc. These could be defined as type Integer. If that is the case then you need to leave out the single quotes in your statement: sqlCommand = "INSERT …

Member Avatar for Reverend Jim
-1
449
Member Avatar for mikeybware

I am trying to sum a field in my MS Access database that I long ago stored as a string. I was using dbCommand.CommandText = "SELECT SUM(SubTotal) FROM Glasses WHERE OrderDate >= #" & SearchDateStart & "# AND OrderDate <= #" & SearchDateEnd & "#" and this would work for …

Member Avatar for kevoxo
0
230
Member Avatar for Abdullahi_1
Member Avatar for Lethugs
0
188
Member Avatar for Aref_1

What are you trying to achieve here? Navigate to the next/previous row in the datagrid or next/previous cell?

Member Avatar for mikeybware
0
488
Member Avatar for scomx

Inno Setup is an excellent installer package. You can read more on their website: [Click Here](http://www.jrsoftware.org/isinfo.php)

Member Avatar for mikeybware
0
692
Member Avatar for John_88

Your INSERT statement looks good, but you do have to wrap your values according to the data type you have it stored as in your database. For example: cmd.CommandText = "INSERT INTO DATATABLE (ID,someString,someDate,someNumber) VALUES (2,'2',#11/23/2015#,16)" cmd.ExecuteNonQuery() A date value needs # around the value, a string needs single quotes …

Member Avatar for Begginnerdev
0
333
Member Avatar for mikeybware

I am trying to insert some values into a database and I have the following SQL: insertString = "INSERT INTO SocialHistory (ExamID, Occupation, SafetyYN, ComputerYN, ComputerHrs) Values('" & CurrentExamID.ToString & "', (SELECT Occupation, SafetyYN, ComputerYN, ComputerHrs FROM SocialHistory WHERE ExamID = '" & LastExamID & "'))" When I execute the …

Member Avatar for mikeybware
0
229
Member Avatar for mikeybware

I have a calendar/scheduler that I am coding and I want people to be able to search for the next available date via a few options. One of those options is to only search those dates that are "Monday" for example. I have the following SQL command to retrieve data …

Member Avatar for kRod
0
415
Member Avatar for mikeybware

I have a database of customers (MS Access database) and I am trying to check out the demographics. I would like to list the top 5 cities and their count (how many times this city is found in my database), as well as the top 5 postal codes and their …

Member Avatar for TnTinMN
0
133
Member Avatar for mikeybware

I have the following code which prints my datagrid nicely. The problem is that it only prints the first page and cuts off everything thereafter. I know I need to implement the e.HasMorePages = True in some manner but I am unable to get that working. Here is my code: …

Member Avatar for robtrue
0
320
Member Avatar for annquin

You can not do a calculation on a string, so try converting the string to an integer throughout your code: "UPDATE books SET quantity = " & CInt(BooksBorrow.qt1.Text) - 1 & " WHERE book_ID = '" & BooksBorrow.TextBox1.Text & "'"

Member Avatar for Dili1234
0
108
Member Avatar for Dili1234

Try this ... will automatically unsert the hyphen as they type: 'Formats the phone numbers to ###-####### Private Sub PhoneTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PhoneTextBox.TextChanged If PhoneTextBox.TextLength = 3 Then PhoneTextBox.Text = PhoneTextBox.Text + "-" 'Put the cursor after the last character PhoneTextBox.SelectionStart = Len(PhoneTextBox.Text) End …

Member Avatar for Dili1234
-1
134
Member Avatar for IS_student

'Connect to the Access Database Dim Con1 As New OleDb.OleDbConnection Con1.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & DBFileName & ";Jet OLEDB:Database Password=password" Con1.Open() 'Open the new connection Dim deleteFirstStr As String = "DELETE * FROM TableName" Dim deleteFirstCMD As OleDb.OleDbCommand = New OleDb.OleDbCommand(deleteFirstStr, Con1) Dim deleteFirstRecord As Int32 = deleteFirstCMD.ExecuteNonQuery() Con1.Close() 'Close …

Member Avatar for mikeybware
0
153
Member Avatar for jontennyeah

For Each row As DataGridViewRow In My.Forms.Main.DataGridView1.Rows DataGridView1.Rows(row).Cells("Column4").Value = "OUT" Next

Member Avatar for mikeybware
0
117
Member Avatar for mageamida

Try doing this (Formats the phone numbers to ###-###-####): Private Sub PhoneTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PhoneTextBox.TextChanged If PhoneTextBox.TextLength = 3 Then PhoneTextBox.Text = PhoneTextBox.Text + "-" 'Put the cursor after the last character PhoneTextBox.SelectionStart = Len(PhoneTextBox.Text) ElseIf PhoneTextBox.TextLength = 7 Then PhoneTextBox.Text = PhoneTextBox.Text + …

Member Avatar for mikeybware
0
178
Member Avatar for ms061210

Instead of cmd.CommandText = "INSERT INTO rental(date_to, date_from)" VALUES (TO_DATE('" & Me.DateTimePicker1.Text & "','dd-mon-yy'), TO_DATE('" & Me.DateTimePicker2.Text & "','dd-mon-yy'))" Try this: cmd.CommandText = "INSERT INTO rental(date_to, date_from) VALUES (#" & DateTimePicker2.Text & "#, #" & DateTimePicker1.Text & "#)"

Member Avatar for mikeybware
0
325
Member Avatar for themaj

You could do something along these lines: Dim myFormat As Integer = CInt(PriceTextBox.Text) PriceTextBox.Text = Format(myFormat, "##,###,###") Hope this helps :)

Member Avatar for themaj
0
362
Member Avatar for mikeybware

I have a string of text being sent through a serial port to a text box (Text1.Text). The string has some symbols in in which I am assuming are Hex values. The hex values are Hex(1), Hex(4), Hex(12), and Hex(17). What I need to do is find the position of …

Member Avatar for Reverend Jim
0
2K
Member Avatar for mikeybware

I have a form that has a tabcontrol (TabControl1) and within that tab control is another one (TabControl2). I have textboxes on the main form as well as in each of the tabcontrols. In my savebutton event I have the following code: If CheckIfDirtyAfterLock = "Just Unlocked" Then CheckIfDirty(Me.Controls) Else …

Member Avatar for Unhnd_Exception
-1
1K
Member Avatar for mikeybware

I have an SQL select statement that I cannot quite get working. Dim SelectStr As String = "SELECT * FROM Appointments WHERE Doctor = '" & ComboBox1.Text & "' AND AptDate = #" & DateTimePicker1.Text & "#" This works perfect ... however I have 2 more WHERE possibilities ... I …

Member Avatar for poojavb
0
179
Member Avatar for flywheeljack

Have you tried going into your application settings and going to the Compile tab > Advanced Compile Options (button at bottom), and changing Target CPU to (x86). It could be that your Windows 7 version is 64-bit and your XP version is only 32-bit. I am not too sure if …

Member Avatar for Begginnerdev
0
150
Member Avatar for tendaimare

One option you may consider, which will actually save alot of database storage, is to save the [B]path[/B] to the image in a [B]text[/B] field in your database. When you are calling the image, just grab the path to the image to be displayed, and you are not saving a …

Member Avatar for mikeybware
0
199
Member Avatar for mikeybware

I have the following code that I am hoping to get working. The code will check for available DYMO printers and print the label. You are to create a template label and I saved mine as template.label. In that template label I have a text field referenced as TEXT1. The …

Member Avatar for mikeybware
0
1K
Member Avatar for pankaj.garg

Alot of times when I go to open a form I suse the following code: [CODE] If (My.Forms.ChildFormName.WindowState = 1) Then 'WindowState = 2 (maximized) / WindowState = 1 (minimized) / WindowState = 0 (normal) My.Forms.ChildFormName.WindowState = 0 My.Forms.ChildFormName.Activate() Else My.Forms.ChildFormName.Visible = True My.Forms.ChildFormName.WindowState = 0 My.Forms.ChildFormName.Activate() End If [/CODE] …

Member Avatar for mikeybware
0
227
Member Avatar for mikeybware

I have the following code which creates a nice little instant messenger for my program. I am running into trouble when I try to send a message to a user that is not logged into their chat window. It waits about 20 seconds, then throws the error message. In the …

Member Avatar for mikeybware
0
374
Member Avatar for mikeybware

I have an Invoice.accdb database (in MS Access) that I am pulling into a MicrosoftReportViewer. I am having trouble subcategorizing the data, and was wondering if anyone could offer a little insight please. I would like to display the data as follows: Invoice Date [INDENT]ID Patient Name Pt ID Status …

Member Avatar for mikeybware
0
111
Member Avatar for mikeybware

I am trying to use WebClient to download a .zip file from my server. In debugging mode the code works perfectly, but when I deploy my software the file does not even begin to download. After my program checks to see if an update is available, it should download the …

Member Avatar for mikeybware
0
320
Member Avatar for cs_tx_usa

You could also add a FileSystemWatcher to your project. In the coding you just add the following properties: [CODE]' Set the FileSystemWatcher to monitor a specific directory FileSystemWatcher1.Path = CurDir() & "\Data\" ' Watch only for changes to a certain file (eg. Setup.accdb file) FileSystemWatcher1.Filter = "Setup.accdb" ' Enable the …

Member Avatar for Mike Askew
0
257
Member Avatar for exception

[QUOTE=exception;1419856]how to email using vb? how to find SMTP?[/QUOTE] I use the following code in my simple app: [CODE]Private Sub SendEmailButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendEmailButton.Click 'create the mail message Dim mail As New Net.Mail.MailMessage() Try 'set the addresses mail.From = New Net.Mail.MailAddress(FromTextBox.Text) mail.To.Add(ToTextBox.Text) 'set the …

Member Avatar for AndreRet
0
106
Member Avatar for sureshbabuganji

Try visiting: [URL="http://msdn.microsoft.com/en-us/library/ms143506.aspx"]http://msdn.microsoft.com/en-us/library/ms143506.aspx[/URL] (Hardware and Software Requirements for Installing SQL Server 2008 R2)

Member Avatar for mikeybware
0
40
Member Avatar for mls
Member Avatar for mikeybware
0
159
Member Avatar for atv161

[QUOTE=atv161;96101]I was wondering if anyone knows how to get text from a cell in a datagrid into a message box or text box? Thanks in advance.[/QUOTE] You can get the first cell (ie. cell(0)) of the [B]SELECTED[/B] row, and send it to TextBox1 by the following code: [CODE]TextBox1.Text = ContactInfoDataGridView.CurrentRow.Cells(0).Value.ToString[/CODE] …

Member Avatar for mikeybware
0
183
Member Avatar for mikeybware

Hello, I am relatively new to posting in forums, so forgive me if I posted in the wrong area. I am having difficulty with saving changes made to my database. First of all, I can create a patient in the database (MS Access), and save their contact info no problem. …

0
63
Member Avatar for mikeybware

Hello, I am relatively new to posting in forums, so forgive me if I posted in the wrong area. I am having difficulty with saving changes made to my database. First of all, I can create a patient in the database (MS Access), and save their contact info no problem. …

0
67

The End.