I'm using an Access 2000 Project w a SQL backend. I've got one form open (clients) and use a value on it to open another form (undo records). I want to open the undo records form filtered to only show undo records for the client record that was open on the previous form. Pretty easy no? Well, I've tried this 50 million ways, and can't seem to get it to work properly.
I've tried passing the server filter string as an opening argument, and then using that in the open event to set the server filter. Even w "me.serverfilter = "" on the closing event, this will always show the previous passed string. So, I run for Client 123, 124, and 125, and it'll open null, 123, and 124. Fun huh...
So, I've tried a bunch of other things. Everything from setting the normal filter, turning off the filterbyform, and now I'm using the docmd.applyfilter , "clientCode = 123" command. But NOW, it'll sometimes apply the filter to the calling form. As a final act of desperation, I put the apply filter into the GotFocus event, but now, the onclose generates an error when I try to remove the "Filter" property.
Anybody got any ideas? I'm putting the code I use in the Undo Client form below.