Results 1 to 2 of 2

Thread: VB/Access Forms RecordSource error

  1. #1
    north
    Guest

    VB/Access Forms RecordSource error

    I am constructing a VB 6.0/Access application, and I have a main form which contains a subform in a datasheet view. I need to dynamically set the recordsource of the subform at run-time. I am doing this by performing the following code in the load event of the main form:

    Me!Subform_Name.Form.RecordSource = QueryString

    Unfortunately, I get the following error which occurs sporatically:

    The expression that you have entered refers to an object that is closed or does not exist.

    I am assuming that the subform is opened at the same time as the main form is loaded. Is this a timing issue? Is there any way I can guarantee the subform object will exist when the main form is loaded?

    Thanks!

  2. #2
    Jethro
    Guest
    Load SubForm

    before issuing commands to it

    Just a thought, you are probably already doing it.

Posting Permissions

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



Click Here to Expand Forum to Full Width