473,382 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

VB2005: Error Using a Separate Search Form

I am working on a form (details) and I need my form to allow to search on
some char fields.

I have a button next to the field users can search. The button calls a
pop-up form to enter the string to search.

ItemsTableAdapter is the table adapter used for the form.

I have 1863 records in the Items table. My goal is to show only the records
matching the string using the same form.

I have modified the DataSet to add a query using a parameter:
SELECT No, Type, ..... Interest3 FROM items where nm_latin like
@srch_nm_latin order by nm_latin

This code is executed when I return from the pop-up. The string contain a
string. Example: "thing%"

If (String.IsNullOrEmpty(Me.Recherche.Text) = False) Then
Dim rech_str As String = Me.Recherche.Text
Me.ItemsTableAdapter.ClearBeforeFill = True
Me.ItemsTableAdapter.FillBy_nm_latin(Me.SignsDataS et.items,
rech_str)
End If

Once this code has executed, the BindingNavigatorchangedItem function is
called and I need to get the key values I am not displaying in the form:

' Load the key values in the form field variables
If
(Me.SignsDataSet.items.Rows(Me.ItemsBindingSource. Position).IsNull("No") =
False) Then
Me.NoKey =
Me.SignsDataSet.items.Rows(Me.ItemsBindingSource.P osition).Item("No") '
ERROR
Else
Me.NoKey = 0
End If

I have seen examples where a new TableAdapter is used for search. I don't
know how I could do that since my form is all built on the
ItemsTableAdapter.

Any hint on how to do this will be appreciated.
Sep 7 '06 #1
1 993
Hi Anne,

I noticed in your code, you're using Me.SignsDataSet.items.Rows. Is items
table in the DataSet? If so, could you let me know the error message? Is it
a build error or runtime error?

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Sep 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Galen Somerville | last post by:
Going from VB6 (RAD) to VB2005 (SAD) The documentation always shows graphics drawing in a paint event like Private Sub Pictcolor_Paint(ByVal sender As Object, ByVal e _ As...
0
by: Larry Lard | last post by:
This came out of a thread explaining to "BK" about error BC42025 ("Access of shared member through an instance; qualifying expression will not be evaluated"); Frans Clasener then came up with...
9
by: bz | last post by:
the vb.upgrade group is dead. I think I will post this here instead. Hi, I ran the Upgrade Wizard to upgrade my VB6 project to VB2005 Express Edition. I got 140 errors and 170 warnings. ...
15
by: Galen Somerville | last post by:
I have an app using a VB6 ActiveX.dll which I also have made as an exe. Both the dll and exe have exactly the same code and start in Sub Main. There is no form involved. I start this activex as...
15
by: Aalaan | last post by:
I am presently a user of classic vb6 and hang out on those newsgroups. Some of you may be aware that there is a very anti MS and vb2005 feeling there. I have tried to get them to tell me which...
3
by: =?Utf-8?B?QmVu?= | last post by:
Hi all, I am new to vb2005. I have two list boxes on a form. one on the left and the other on the right. The left contains a list of items. Between the two list boxes I have a button to add...
4
imrosie
by: imrosie | last post by:
Hello all, Yes, another newbie...HELP please. I have a problem compiling a procedure on a form. The 'search customer' form was built on a query. The proc is attached to command button which opens...
1
by: DesCF | last post by:
I'd like to put media player on a form and have it play a video. I am just looking for a pointer as to where to get started on this project. I am using vb2005 express. -- Using Opera's...
1
by: Vae07 | last post by:
Ok so here is a brief summary of my problem. I need a pop up form that submits input text box information to a pocket excel workbook upon a command botton click. Text box inputs are checked for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.