Continuous Form button not working when used as a subform in main menu RRS feed

  • Question

  • Hello,

    I have a continuous form (ContinuousFrm) that has an open button to open another form (DetailFrm) when a record is selected. The button in ContinuousFrm works fine and shows DetailFrm with the filtered information. 

    I have a main form (MainFrm) which has a search button to filter ContinuousFrm by multiple criteria. So, I placed ContinuousFrm as a subform in MainFrm. The search button works fine, but when I select a record in ContinuousFrm and click open button it does not filter DetailFrm anymore. Instead it shows a pop-up window that says: "Enter parameter value for: Forms!ContinuousFrm!ID" where ID is the field I'm using to filter ContinousFrm.

    My guess is that the syntaxis must be changed because ContinuousFrm changed from being a Form to a Subform. I tried by changing Forms!ContinuousFrm!ID to  [Forms]![MainFrm]![subContinousFrm].[ID] but DetailFrm shows blank.

    I would appreciate any help on how to make it work again.



    Thursday, August 2, 2018 6:27 PM


All replies

  • Hi Agelica,

    Yes, you could try changing the syntax to something like:


    However, it might be simpler if there's no parameter in the query or record source of your popup form.

    Can you post the code for your button to open the detail form? Thanks.

    Thursday, August 2, 2018 6:42 PM
  • Hi Angelica,

    Your reference is not correct. Please correct your syntax like theDBGuy has said.

    Friday, August 3, 2018 2:48 PM
  • Thanks for your reply theDBguy!

    The button to open has an embedded macro that looks something like this:


    Form Name: DetailFrm

    View: Form

    Where Condition: = [Name] = [Forms]![MainFrm]![subContinuousFrm].[Name]

    I tried changing the syntax to your suggestion and this time the popup form (DetailFrm) shows but it is blank.

    On the other hand, the record source of my popup form (DetailFrm) is a query that only selects a few columns from a database (ClientDB). However, it does have another subform which has a different record source (TrackingDB).

    Any other thoughts?


    Friday, August 3, 2018 4:40 PM
  • Hi,

    We could try making it simpler; hopefully, this will work. Try changing the macro line from this:

    Where Condition = [Name] = [Forms]![MainFrm]![subContinuousFrm].[Name]

    to this:

    Where Condition = [Name] = [Name]

    However, there's probably a quote marks in there somewhere, correct? If so, try it this way:

    Where Condition = "[Name]='" & [Name] & "'"

    Hope it helps...

    Friday, August 3, 2018 4:47 PM
  • Hey there,

    I tried both and it now shows DetailForm on the first record, but not filtered.

    We are making progress though.

    I wonder if the subform in DetailForm is messing with the ID...

    Friday, August 3, 2018 5:22 PM
  • Hi,

    Is there any way you can share your db, so we can see what is actually going on? If not, are you willing to switch from embedded macro to VBA?

    Friday, August 3, 2018 5:29 PM
  • I can do either, how can I share the db?
    Friday, August 3, 2018 5:36 PM
  • I sent you an email to

    Thanks for your help!

    • Marked as answer by Angelica Leon Friday, August 3, 2018 6:23 PM
    Friday, August 3, 2018 5:56 PM
  • Hi,

    I see the problem with the name of the field as "Name." Unfortunately, Name is a reserved word in Access. To fix the problem, it's better to change the name of the textbox or field to something else.

    Hope it helps...

    Friday, August 3, 2018 6:14 PM
  • For anyone going through this same issue:

    the problem was the use of the name "Name" because it's a "reserved" word in Access. I changed the name of the textbox to "txtName." and it worked!

    theDBguy rocks!

    Friday, August 3, 2018 6:24 PM
  • Hi,

    Congratulations! Glad to hear you got it sorted out. Good luck with your project.

    Friday, August 3, 2018 6:46 PM