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!
Hello strongm,
Thanks for your reply. I have done some simple things with the APIs so I am willing to try something like that. I have used the PostMessage API to shut down a related application so I am at least a little bit familiar with the concept.
If you would be kind enough to point me I...
Hello,
I do more VBA than VB so please bear with me. I have several listboxes with similar data that I am keeping in sync manually. Is it possible to combine all of the data into one list box and have everything column aligned properly? Here is the type of thing I have:
lstFName lstLName...
Sorry, I didn't communicate very clearly after programming most of the night before to fix a bug. I have a form with a new button which clears all of the form controls. What I would like to be able to do is stop other control events while I am processing the new code (eg no GotFocus, LostFocus...
Hello all,
I have a process that causes a whole bunch of events to fire. If I could temporarily disable event processing that would be very helpful. In Excel VBA you can do this, but I wasn't sure in VB6. Thanks for your help!
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.