Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    11

    Unanswered: New user needs help!!!

    Hi everyone,
    just wondering if someone could help me out with the problem in my code. im new to access/vbscript and dont really understand some of the stuff. ok here is the current code im trying to run at this moment. The error '424' object requires keeps popping up for the line in red. can anyone suggest anything?

    Private Sub Custodian_History_Form_Enter()

    Me.[Custodian History form].Nodes.Add Text:="Custodian History", Key:="Custodian History"
    Me.[Custodian History form].Nodes.Add relationship:=tvwChild, Relative:="Custodian History", Text:="AssetNumber"
    Me.[Custodian History form].Nodes.Add relationship:=tvwChild, Relative:="Custodian History", Text:="Custodian ID"
    Me.[Custodian History form].Nodes.Add relationship:=tvwChild, Relative:="Custodian History", Text:="On Date"
    Me.[Custodian History form].Nodes.Add relationship:=tvwChild, Relative:="Custodian History", Text:="Off Date"
    Me.[Custodian History form].Nodes.Add relationship:=tvwChild, Relative:="Custodian History", Text:="Changes in Asset"

    Dim Data_Base1 As DAO.Database
    Dim Record_Set1 As DAO.Recordset
    Dim Query_Def1 As QueryDef
    Dim strcombo As String
    Set Data_Base1 = CurrentDb()
    Set Query_Def1 = Data_Base1.CreateQueryDef("")
    Query_Def1.SQL = "SELECT [AssetNumber] FROM [Asset Master];"
    Set Record_Set1 = Query_Def1.OpenRecordset()

    With Record_Set1

    Do While Not .EOF

    strcombo = Record_Set1("AssetNumber")
    AssetNumber.AddItem strcombo
    Me.[Custodian History form].Nodes2.Add relationship:=tvwsibling, Relative:="Changes in asset", Text:="strcombo"
    .MoveNext
    Loop
    .Close

    End With

    Set rs1 = Nothing

    db.Close

    End Sub

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Hi

    I suggest you read the FAQ page and edit your post. If you ask the question in the title, you'll get more people looking.

    Also, which version of Access are you using?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •