adodc using data report, data environment

adodc, data report and data environment for viewing exact data for pri

Page 1 of 1

1 Replies - 11113 Views - Last Post: 15 January 2009 - 10:30 AM Rate Topic: -----

#1 alexane   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-January 09

adodc using data report, data environment

Post icon  Posted 15 January 2009 - 02:47 AM

xFind = "SELECT * FROM tblBorrowed WHERE BorrowersName LIKE'" & Text1 & "%'"
        xAdd = "SELECT * FROM tblBorrowed"
        Adodc3.RecordSource = xFind
        Adodc3.Refresh


    If Adodc3.Recordset.RecordCount = 1 Then
    Adodc3.Recordset.Delete
    ElseIf Adodc3.Recordset.RecordCount = 0 Then
    Adodc3.Recordset.AddNew

    Adodc3.Recordset.Fields!BorrowersName = Text1.Text
    Adodc3.Recordset.Fields!ItemName = Combo1.Text
    Adodc3.Recordset.Fields!DateBorrowed = dtB
    Adodc3.Recordset.Fields!Quantity = Text5.Text
    Adodc3.Recordset.Fields!Unit = Text6.Text
    Adodc3.Recordset.Fields!Remarks = Text4.Text
    Adodc3.Recordset.Update

With DataEnvironment
DataEnvironment = xFind
    Adodc3.Refresh
    DataReport2.Show vbModal
End With
End If



Mod Edit: Please use code tags when posting your code. Code tags are used like so => :code:

Thanks,
PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: adodc using data report, data environment

#2 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: adodc using data report, data environment

Posted 15 January 2009 - 10:30 AM

Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:

  • Post the code you're having problems with (DONE)
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1