Hello,
We have many, many stored procedures and I need to find a couple that have a specific piece of code in them. Is there any way to globally search the stored procedures in this manner? Thanks!
Sorry I wasn't more precise in my first post. From my VB6 days, you could set in code the SelectedIndex to -1 so the ComboBox didn't initially display anything.
On my form I have a Button, 2 TextBoxes and a ComboBox which I filled from Northwind. The code below works
Form Load code
...
TextBox bound to a CombBox Text property similar to this:
TextBox1.DataBinding.Add("Text", ComboBox1, "Text")
If the ComboBox SelectedIndex is -1
1. Do I have to manually set TextBox1.Text property = ""
2. If I do that, does it impact the DataBinding in any way
Hello everyone,
Let's say that I have the following query populating a combobox:
Select CustomerID, CompanyName, Address, City, State From Customers
I have set the DataSource property to a DataTable from a DataSet and have also set the DisplayMember and ValueMember properties to CompanyName...
If you Imports System.Data.OleDb and use an OleDbConnection you can then set the .Provider property directly, which will accomplish the same thing you did.
Here is a "final" version with CType to CheckBox so I can validate the Checked property directly. Note that I had to add an Imports statement for forms to do this.
Imports System.Windows.Forms
Imports SolutionName.ClassName
Public Sub FormatText(ByVal CurForm As Windows.Forms.Form)
Dim temp...
As an aside to the above code which I forgot to mention, the reason I use the Tag property for CheckBox controls is because the base Control class does not have a Checked property.
CStr(GetControlByName("chkIgnoreLongDistance", CurForm).Tag)
I had to use CStr because it did not recognize...
Rick,
Your house analogy was very helpful in the FAQs.
Here is what I ended up doing pretty quickly thanks to the responses in this thread. The current code resides in a standard module with a form object as a function argument. So I created a class based on chrissie1's FAQ with one public...
Thanks for the quick responses which of course created a few more questions.
chrissie1,
In your FAQ, to what does the Me refer?
Dim info As System.Reflection.FieldInfo = Me.GetType().GetField("_"
Here is the declaration I am using:
Public Sub FormatText(ByVal CurrentForm As...
Hello All,
If VB6, you could access particular form controls by using Controls("ControlName"), etc. It appears you must use the index in .Net. but they can change if you add or delete a control on the form.
I am passing a form reference into a class so that I can read some of the control...
It appears that the Validating and Validated control events correspond to VB/VBA BeforeUpdate and AfterUpdate. Can someone confirm that this is the case? Thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.