In your database for the embedded navigation subform I find that everything works fine until I search for a different record on the parent form. When I do this, say search for first name James for example. The Parent form advances to the appropriate record but the RecCount field on the subform is not updated. It still shows the values from the record where I initiated the search. Am I missing something here? Could you show how to correct this? I love this sub form idea and want to include it in a database currently in development. Many thanks for the great videos.... Bill Dowler.
Kevin Robertson 43 days ago
How are you performing the search?
William DowlerOP 43 days ago
Hi Kevin,
Just used the search field on the bottom of the Parent Form.
Kevin Robertson 43 days ago
In a Global Module I made it a Function so I could use it in the Embedded Macro
of a Search Combo Box (created by the wizard).
Note: I renamed each Subform object to 'Navigation'.
Public Function UpdateRecCount(FormName As String)
---------------
In the Embedded Macro (if using the Search Combo Box)
Select Run Code from the Add New Action Combo Box
Enter the Function Name: UpdateRecCount("CustomerF") ---------------
You may have notice it also doesn't work on CustomerListF.
In the On Current event
UpdateRecCount (Me.Name)
For the Search Box in the built-In Navigation Bar also add the
above code to the Paint event of the Detail Section.
William DowlerOP 43 days ago
Thanks Kevin,
How would I change this if I wanted to use a custom button to run the dialog opened by DoCmd.RunCommand acCmdFind
Kevin Robertson 43 days ago
Detail_Paint() takes care of that.
William DowlerOP 43 days ago
Thanks Kevin, I'll give that a shot.....
William DowlerOP 42 days ago
Kevin,
I'm not sure what you did here: Note: I renamed each Subform object to 'Navigation'.
Kevin Robertson 42 days ago
The subform object on each of the Forms. It is currently named 'Customers' - I renamed it ' Navigation'.
You can leave it as 'Customers' if you want (they all have to be named the same), just make sure that is what you refer to in the code.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.