|
Thanks Richard, I'll try the debugger to trace as you suggest, although I'm a little weak on tracing with debugger. Does it make sense that this same code block works perfectly well in 2 or 3 other Forms, and the entire project & code executes just fine on my laptop.
Appreciate your help and suggestions
|
|
|
|
|
Member 15109325 wrote: Does it make sense It is not just the code block that needs to be considered, but the parameters being used in its execution. And without seeing the specific code and all the values being used, it is impossible to comment further.
|
|
|
|
|
Might be a little labor intensive, but unless you have a single module that handles all similar requests, there is a chance, like Richard said, there's just one statement or parm that's throwing things off. You can look but not see ... then you pretty well have to run the debugger and "single step" to watch everything unfold ... the way you think it should.
With "file dialogs" you usually provide "patterns" for things; check those out. Compare it to the others.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I am looking but haven't found anything yet. This project is almost 10 years old and has been working until about a week ago. I hear what ya'll saying but a) I admit my sheer incompetence with tracing and debugging and b) I can't grasp how I can copy this project to my laptop and it works perfectly. AND the exact same SUB is used on 2 other forms without incidence.
I'm about to start ripping the guts out of this main form hoping to find the culprit. I've already scoured it and REM'd a bunch of code.
|
|
|
|
|
Member 15109325 wrote: I can't grasp how I can copy this project to my laptop and it works perfectly
Two possibilities.
First the environment is different. Different OS, different libraries, different permissions, etc.
Second the data is different. You are running with a dataset X. But the problem occurs with dataset Y.
Member 15109325 wrote: AND the exact same SUB is used on 2 other forms without incidence.
That is explained easily - the data is different. Look at the differences and see how the code handles each.
|
|
|
|
|
Are you doing any threading or Tasks?
|
|
|
|
|
Years ago, I wrote a VB6 App to add creation date to certain Outlook items. Now, I don't even know how to access Outlook folders via VB.NET. A complete code sample to run through the Outlook folders would be much appreciated.
Thanks.
Marvin
|
|
|
|
|
|
Thank you for your response, but it does not satisfy my issue. I want to create a VB.Net app, not a VBA routine. I have tried the code snippets you have suggested, but continue to get errors when trying to run it in Visual Studio. Any further suggetions would be appreciated.
Marvin
|
|
|
|
|
|
Again, thanks for the reply. I see no reference to where the code should be copied. I want to create a Windows Form App with VB.net. When I place the code into the "View Code" area, I get multiple errors.
I guess I need additional help.
Marvin
|
|
|
|
|
I have no idea what you are doing or what errors you are seeing, so these suggestions may, or may not, help. If I assume you are using Visual Studio 2022, you first need to create a Windows Forms application using the VB.NET and .NET Framework workload. You should then see the names of your project files in the Solution Explore window. Open the Form1.vb file (you may need to right click on the name and select "View Code"), which should give you an editor view of the generated code. You should now be able to see where the different parts of the code can be inserted.
|
|
|
|
|
You could use this code:
Imports Microsoft.office.Interop.Outlook
Public class CLASS_NAME
Public App As OutlookApplication
Public Sub new()
App = new ( App.getType())
End Sub
End Class
|
|
|
|
|
Simple question for experienced and sympathetic VB.Net developers.
I'm a senior citizen and I haven't really done much Dev for a long time (15yrs) but have occasionally worked on VS12 with VB.Net. I am NOT a trained/schooled developer...mostly self taught to do enough to get by in my own work. My dev is for me only, I don't build with pro teams or any product for sale. It's just to handle MY databases and other app needs.
Looking at the various VS platforms from VS17 thru VS22 I am torn on which way to go as I don't need to be overwhelmed by a steep learning curve just to connect to Access-Office 365 and import/export, manage/report data.
I would appreciate general recommendation before I d/l & install something that intimidates or scares the hell out of me. I'm leaning towards VS17 but could be persuaded otherwise. Please be gentle
I appreciate your responses, thank you.
|
|
|
|
|
If you are going for Visual Studio then choose the latest version: VS 2022. The free community version is quite user friendly. Like you I am a senior citizen and my development is largely just for my own amusement. And if you are only doing VB.NET development you only need to install the .NET and VB.NET workloads.
|
|
|
|
|
You might want to verify the Requirements for VS 2022. Google for following. Don't worry about 'suggested', just look at minimum.
visual studio 2022 requirements
Before doing anything you might want to take a look at the docs/examples for Office 365. If you did MS Access programming in the past I suspect you are going to find that this (365) will be significantly different. But I haven't looked at it in depth.
|
|
|
|
|
I use Visual Studio 2010. I recommend building a library of books such as Professional Visual Studio 2010, Programming Microsoft ado.net 2.0, Microsoft's SQL server 2008 T-SQL Fundamentals. install SQL server and ssms. ask the pilot how to write the functions you need.
ramsey
|
|
|
|
|
I'm confused, why would I go backwards if I've already been developing apps with VS 2012 that are integrated with Access (accdb) Office 365? What am I missing here?
|
|
|
|
|
He's just mentioning that he uses 2010. I think his main point is about developing a collection of books.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
new one(latest) is the best,
use VS2022
|
|
|
|
|
Hi,
I am looking for a solution to transfer my mysql data into
tally using vb6.
please help me.
|
|
|
|
|
Google for "Tally import data VB6" and you'll find that you have to export your MySQL data into an XML format that is Tally compliant. Once you have those file(s), Tally can import those file(s) directly.
Don't even think of asking for code. VB6 has been dead for over 20 years now and I have never used Tally, nor will I ever.
|
|
|
|
|
I would want to prompt user to select a tool name from combobox1, then out automatically, combobox2 gets filled with tool description and size, which is a column in the selected table. Currently i have been using the following code, however the problem comes when i would like to update the database and add another table. This would mean adding the code in the application as well. I would like the application to be able to detect that a new tool table has been added and show that automatically without having to code again
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' ADDING TABLE NAMES TO COMBOBOX 1 (TOOL NAME)
con.Open()
Dim schemaTable As DataTable = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
For Each dr As DataRow In schemaTable.Rows
Combobox1.Items.Add(dr.Item("TABLE_NAME"))
Next
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Combobox1.SelectedIndexChanged
'FILLING COMBOBOX 2 (TOOL DESCRIPTION AND SIZE) DEPENDING ON SELECTION IN COMBOBOX 1 (TOOL NAME)
If Combobox1.SelectedIndex = 1 Then
Combobox2.Text = ""
con.Open()
Combobox2.Items.Clear()
Dim dr As OleDbDataReader
Dim cmd As New OleDbCommand
cmd.CommandText = "Select * from 14_POUND_HAMMER"
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
Combobox2.Items.Add(dr.GetString(1))
End While
dr.Close()
con.Close()
ElseIf Combobox1.SelectedIndex = 2 Then
Combobox2.Text = ""
con.Open()
Combobox2.Items.Clear()
Dim dr As OleDbDataReader
Dim cmd As New OleDbCommand
cmd.CommandText = "Select * from 3_QUARTER_IMPACT_WRENCH"
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
Combobox2.Items.Add(dr.GetString(0))
End While
dr.Close()
con.Close()
ElseIf Combobox1.SelectedIndex = 3 Then
Combobox2.Text = ""
con.Open()
Combobox2.Items.Clear()
Dim dr As OleDbDataReader
Dim cmd As New OleDbCommand
cmd.CommandText = "Select * from ABRASIVE_CUT_OFF_SAW "
cmd.Connection = con
dr = cmd.ExecuteReader
While dr.Read
Combobox2.Items.Add(dr.GetString(0))
End While
dr.Close()
con.Close()
|
|
|
|
|
Whay are you using manual code to fill the comboboxes? Use DataAdapters and DataBinding and the framework will do it for you. You can also set triggers on the database so you get notified when a new product is added.
|
|
|
|
|
Lots of problems here.
Kudzanai Victor wrote: Select * from ABRASIVE_CUT_OFF_SAW
Problem 1 (most serious): The name of the tool should be kept IN a database column. It should NOT be a table.
Design you are looking for is likely like this
Table: Tool
Columns: Id, Name, Description
Table: Tool_Attribute
Columns: Tool_Id, Name, Description
If you need more detail for Attribute you might add one or two more columns. If more detail than that is added then you might need an additional third table.
Once you do the above then getting a list of all tools consists of querying the first table. This includes name, description AND the id.
Then detail for a single tool is gotten by using the id from the above list.
------------------------------------------
Kudzanai Victor wrote: Select * from ABRASIVE_CUT_OFF_SAW
Problem 2: Don't use the asterisk.
Rather explicitly name the columns that you want to retrieve.
|
|
|
|