Preview

Local Literature Transcript of Record System

Satisfactory Essays
Open Document
Open Document
383 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Local Literature Transcript of Record System
Hello, I have a combo box to select the ID, then it will display the particular record from from the database into the text boxes. And now I'm trying to make a update command button. Then I can just change the record which displaying in the text box. And click update, then the record will be updated in the database. But my cmdUpdate_Click() statement seems doesn't work. Anyone can help please? Cheers

Option Explicit
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset

Private Sub cmbID_Click()
If cmbID.Text = "[Make Selection]" Then Exit Sub rs.Open "SELECT * FROM co_authors WHERE ID = " & cmbID.Text txtName.Text = rs!author_Name txtCountry.Text = rs!country txtPaperID.Text = rs!paper_ID rs.Close End Sub

Private Sub cmdGo_Add_submission_info_Click() submission_info.Show update_co_authors.Hide
End Sub

Private Sub cmdUpdate_Click()
Dim ar As ADODB.Recordset
Set ar = New ADODB.Recordset ar.Open "SELECT * FROM co_authors WHERE ID = " & cmbID.Text
If ar.EOF Then ar.AddNew
Else: ar.Update
End If ar!author_Name = txtName.Text ar!country = txtCountry.Text ar!paper_ID = txtPaperID.Text ar.Update End Sub

Private Sub Form_Load()

Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset

conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\262CS\project\db1.mdb;" & _
"Persist Security Info=False"

rs.Open "SELECT ID FROM co_authors", _ conn, adOpenForwardOnly, adLockReadOnly, adCmdText

cmbID.Text = "[Make Selection]"

Do Until rs.EOF cmbID.AddItem rs!ID rs.MoveNext Loop

rs.Close

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If rs.State = adStateOpen Then rs.Close
If conn.State = adStateOpen Then conn.Close
Set rs = Nothing
Set conn = Nothing
End Sub

-------------------------------------------------

Hi,
If this problem is still not solve you can try this:::

This is your code:

Private Sub cmdUpdate_Click()
Dim ar As ADODB.Recordset
Set ar =

You May Also Find These Documents Helpful

  • Satisfactory Essays

    In the space provided below to copy and paste the remainder of your IP_FileWrite.vbs sourcecode if it did not fit in the first textbox.…

    • 1328 Words
    • 6 Pages
    Satisfactory Essays
  • Good Essays

    It210 Week 4 Psuedocode

    • 584 Words
    • 3 Pages

    Program Pseudocode Currency_Convertor Main Module Delcare USDollars As Float Declare Rate1 As Float Declare Rate2 As Float Declare Rate3 As Float Declare Rate4…

    • 584 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Comp230 Wk 5 Lab

    • 411 Words
    • 2 Pages

    Copy your Mod1_PCTests.vbs program from NotePad++ and paste it into the space provided below. Any portion of the script that will not fit should be continued in the textbox on the next page.…

    • 411 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    In the space provided below, copy and paste your VBScript Program Code. If it doesn’t fit, use the next page for the continuation of your sourcecode program…

    • 529 Words
    • 3 Pages
    Powerful Essays
  • Powerful Essays

    It 210 Final Project

    • 1033 Words
    • 5 Pages

    Write, “Select international currency type: Canadian dollars, Mexican pesos, English pounds, Japanese yen, French francs.”…

    • 1033 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    sqlStr = "SELECT Computer, Room_Num, Speed, Num_CPUs, OS_Type, HDD_Size FROM Computers WHERE Num_CPUs = 1 OR Speed < 2.1 OR HDD_Size < 300 ORDER BY Room_Num"…

    • 503 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Comp230 W2 Ilab

    • 1120 Words
    • 5 Pages

    Student Name | | Class | Comp230 | Date | 5/16/2013 | VBScript IPO VBox Lab Report ' VBScript: NameAge.vbs ' Written by: ' Date: 5/16/2013 ' Class: Comp230 ' Professor: Giao Dau ' = == == == ==…

    • 1120 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    COMP230 Week 4

    • 458 Words
    • 4 Pages

    WScript.Echo "The IP Address in Room " & room & " for computer " & computer & " is " & ipAddress(room-100,computer-1)…

    • 458 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Bibliography: John and Hazel Robinson. Collection of Papers and Photographs. Ca. 1973-2000. Privately held by John and Hazel Robinson, Asheville, North Carolina.…

    • 898 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Norland Journal Entry

    • 674 Words
    • 3 Pages

    I have chosen to document the following years as I believe they will be full of adventure, excitement and interesting tales, on these pages I will capture the journey to take place.…

    • 674 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    cloud

    • 2069 Words
    • 9 Pages

    One of the drawbacks of using VBScript instead of a full-featured programming language such as C++ or Java is the fact that VBScript does not have the capability to clear the command prompt screen. This is one of the things we need to do with our menu-driven PC_Tests program each time the menu is re-displayed. Since we can’t do this in VBScript, we will do it in a Batch script file.…

    • 2069 Words
    • 9 Pages
    Satisfactory Essays
  • Good Essays

    5. Run the program again by pressing the <F6> function key, but this time type wscript EchoDemo.vbsand…

    • 2429 Words
    • 10 Pages
    Good Essays
  • Good Essays

    Whether a person seeks public information to perform a background check for a job applicant, a potential renter, or a private investigation, knowing the Idaho laws that pertain to such matters is essential. Additionally, people have a legal right to obtain public in accordance with the Transparent Idaho policies enacted in 1990. The exact details of this law may be found in the relevant manual made available by the Idaho Attorney General’s office. It is always important to stay apprised of the various statutes when conducting a background check or request for public records.…

    • 841 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Annotated Bibliography

    • 711 Words
    • 3 Pages

    Bureau of Labor Statistics, U.S. Department of Labor. “Advertising, Promotions, and Marketing Managers.” Occupational Outlook Handbook, 2012-13 Edition. Web. 19 Oct. 2013.…

    • 711 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Annotated Bibliography

    • 1293 Words
    • 6 Pages

    Fialkoff, Francine. "Too Sensitized To Plagiarism?." Library Journal 127.20 (2002): 100. Professional Development Collection. Web. 8 Mar. 2012.…

    • 1293 Words
    • 6 Pages
    Satisfactory Essays

Related Topics