Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    65

    Unanswered: Referencing subform recordsource error 2001

    Hi,

    im trying to change the record source for a subform based on a selection made from a dropdown on my main form:

    Code:
    Private Sub Student_AfterUpdate()
    Me.TravelMaster.Form.RecordSource = sQl
    end sub
    problem is i get error 2001 'you cancelled the prvious operation'

    when ever i update the combo box- im pretty certain im referencing the subform properly.

    here are the details

    main form - master
    subform- travelmaster
    mainform drop-down: student

    anyone know what is happening im pretty sure ive done it just like this before and it's worked- am stuck- none of the stuff ive found on google answers this

    greg

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    Try this.
    Forms!MainFormName!SubFormName!FieldName = sQ1

  3. #3
    Join Date
    May 2006
    Posts
    65
    hi,

    it's not a field it's the record source of the subform.

    cheers

    greg

  4. #4
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    Try with RecordSource instead of Fieldname.

Posting Permissions

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