Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Statement doesn't work (Access 2003)

    Hello All,
    I have some code, looks like this "Debug.Print Forms![frmincidents].[equip subform]![Text50]". I have been using this for some time but just recently switched from Access 2002 to Access 2003. Now it tells me "Can't find "|" in your expression". There must be a slight change in the syntax acceptance between the two versions. Anyone have any ideas?

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Statement doesn't work (Access 2003)

    Try using a bang ! instead of a point .

    Debug.Print Forms![frmincidents]![equip subform]![Text50]

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Statement doesn't work (Access 2003)

    Thanks Hans,
    I did try that and it says "Can't find field equip subform in your expression". I failed to note that I moved this object from the main part of the form to the footer, does that make a difference?

    Thanks,
    Mark

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Statement doesn't work (Access 2003)

    It shouldn't matter whether the subform is in the detail section or in the form footer. Perhaps the name got changed when you moved the subform.

    You must use the name of the subform as a control on the main form. This is not necessarily the same as the name of the subform in the database window. To find the control name, open the main form in design view and click one on the subform. Don't click on the subform a second time, for that will select something in the subform. The control name will be displayed in the Objects box on the toolbar, and in the title bar of the Properties window, and of course in the Name property.

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Statement doesn't work (Access 2003)

    Hi Hans,
    Looks like the subform name got changed to child154 for some reason.

    Thanks,
    Mark

Posting Permissions

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