473,378 Members | 1,175 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,378 software developers and data experts.

Problems with FIND BUTTON

12
Hi i have created an edit form in .NET however, if i enter a Head_ID in a textbox and click find then it should display the respective data in the text boxes in the form but its not displaying any data. Please help i am a new to .net and i dont have any much Knowledge of it. thanks.

the code for the find button is:

Expand|Select|Wrap|Line Numbers
  1.   Protected Sub FIND_Click(ByVal sender As Object, ByVal e As EventArgs) Handles FIND.Click
  2.  
  3.         Try
  4.         Dim Head_ID As String = txtHeadID.Text
  5.         Dim SubHead_ID As String = txtSubHeadID.Text
  6.         Dim _GET_FileMaintUpdate As New Records_Mgmt_BLL.RM_FileMaint_BLL
  7.         Dim key As DataRow = _GET_FileMaintUpdate.GET_FileMaintUpDate(Head_ID, SubHead_ID)
  8.  
  9.         If IsDBNull(key(1)) Then
  10.             txtHeadID.Text = ""
  11.         Else
  12.             txtHeadID.Text = key(1)
  13.         End If
  14.  
  15.         If IsDBNull(key(2)) Then
  16.             txtSubHeadID.Text = ""
  17.         Else
  18.             txtSubHeadID.Text = key(2)
  19.         End If
  20.  
  21.         If IsDBNull(key(3)) Then
  22.             txtOldFileID.Text = ""
  23.         Else
  24.             txtOldFileID.Text = key(3)
  25.         End If
  26.  
  27.         If IsDBNull(key(4)) Then
  28.             txtLocationID.Text = ""
  29.         Else
  30.             txtLocationID.Text = key(4)
  31.         End If
  32.  
  33.         If IsDBNull(key(5)) Then
  34.             txtStatusID.Text = ""
  35.         Else
  36.             txtStatusID.Text = key(5)
  37.         End If
  38.  
  39.         If IsDBNull(key(6)) Then
  40.             txtVolume.Text = ""
  41.         Else
  42.             txtVolume.Text = key(6)
  43.         End If
  44.  
  45.         If IsDBNull(key(7)) Then
  46.             txtDateFileOpened.Text = "1/1/0001"
  47.         Else
  48.             txtDateFileOpened.Text = key(7)
  49.         End If
  50.  
  51.         If IsDBNull(key(8)) Then
  52.             txtRelatedTo.Text = ""
  53.         Else
  54.             txtRelatedTo.Text = key(8)
  55.         End If
  56.  
  57.         If IsDBNull(key(9)) Then
  58.             txtRemarks.Text = ""
  59.         Else
  60.             txtRemarks.Text = key(9)
  61.         End If
  62.  
  63.         If IsDBNull(key(10)) Then
  64.             txtFileDescription.Text = ""
  65.         Else
  66.             txtFileDescription.Text = key(10)
  67.         End If
  68.  
  69.         If IsDBNull(key(11)) Then
  70.             txtFileTypeID.Text = ""
  71.         Else
  72.             txtFileTypeID.Text = key(11)
  73.         End If
  74.  
  75.  
  76.         Catch ex As Exception
  77.  
  78.         txtHeadID.Text = ""
  79.         txtSubHeadID.Text = ""
  80.         txtOldFileID.Text = ""
  81.         txtLocationID.Text = ""
  82.         txtStatusID.Text = ""
  83.         txtDateFileOpened.Text = ""
  84.         txtVolume.Text = ""
  85.         txtRelatedTo.Text = ""
  86.         txtRemarks.Text = ""
  87.         txtFileDescription.Text = ""
  88.         txtFileTypeID.Text = ""
  89.  
  90.         End Try
  91.  
  92.     End Sub
  93. End Class
Mar 1 '12 #1
1 1144
abby1
12
Hi i just want to say i got through. thanks.
Mar 1 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: amywolfie | last post by:
I would like to place a Find button on a form which uses the built-in Access Find facility. If no records are found, I would like to display a custom "no records found - plesae try again" message...
2
by: pnr | last post by:
I have an repeater that contains data witch it schould be possible to delete, I have placed a delete button in each row, but i can't make it work :-( This is my repeater (just a little bit of...
2
by: Chris Fink | last post by:
This should be relatively simple but I am unable to find an asp:button tag in a datalist footer. I have tried it numerous ways including the FindControl method from the many events that the...
2
by: ad | last post by:
I have a Button (named btnOK) and a ImageButton (named ImageButton1) in a Template field of a GridView; I use the codes below to find the Button and ImageButton, the ImageButton can be found,...
0
by: David | last post by:
Hello all. I am trying to implement my first server control and have run into two problems that I cannot solve. I need the assistance of someone with more experience. My goal was to create an...
1
by: TheScullster | last post by:
Hi all Bit of an obscure one this, but hopefully someone will be able to help. 4 years ago we had a potentially catastrophic problem with our Access database. From memory it was written in...
4
by: saima khushbakht | last post by:
hi i need coding for find button using adodc control.the search should be by name.if we enter the name of employee then search button should search name from data base either it exists in batabase...
0
by: Mike | last post by:
I have a web page that is using the asp.net wizard control. On this wizard, there is a next, cancel buttons, how can I find these buttons in this wizard. If I do something like this...
2
by: daniel_nolan | last post by:
I'm brand new to Python--and programming in general. I'm trying to use IEC to control Internet Explorer. I've navigated to a page, and now I'm trying to click a button. The button appears to be...
1
ddtpmyra
by: ddtpmyra | last post by:
If I use the wizard to built a find button it will generate below codes. But what about if I wanted to have two fields how will I do that? Private Sub Command33_Click() On Error GoTo...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.