AvantGuy
neophyte
- Local time
- Today, 00:55
- Joined
- Mar 25, 2018
- Messages
- 22
I have a Mainform and one Subform. They both have the same query as their RecordSource. I dynamically update the SQL of that query via an event in the main form -- the AfterUpdate() of a combo box.
I'm having a dickens of a time getting the Subform to Requery after that event fires. When I exit then relaunch the Mainform, the Subform properly reflects the query results from the previous run. That's because when it first loads, it's seeing the as yet unmodified-by-Mainform SQL of the query.
I've tried all the methods of Subform refresh I could find. The main methods recommended in various fora yield runtime errors (they compile w/o error). They blow up on any code that references the sub from the main. These runtime errors due to references seem like a hint into my problem.
I could use some help. Thanks, --Bob.
I have a Mainform and one Subform. They both have the same query as their RecordSource. I dynamically update the SQL of that query via an event in the main form -- the AfterUpdate() of a combo box.
I'm having a dickens of a time getting the Subform to Requery after that event fires. When I exit then relaunch the Mainform, the Subform properly reflects the query results from the previous run. That's because when it first loads, it's seeing the as yet unmodified-by-Mainform SQL of the query.
I've tried all the methods of Subform refresh I could find. The main methods recommended in various fora yield runtime errors (they compile w/o error). They blow up on any code that references the sub from the main. These runtime errors due to references seem like a hint into my problem.
I could use some help. Thanks, --Bob.