Thanks Stewart. Before I even posted my question I figured that the issue might be with not having control on the form that held CaseNo, because the first design didn't so created two forms and was testing the code on both of them. I came across another issue with code you just provided and was just playing around with it an got it to working. I changed it to.
Stewart, First I'd like to take you for the reply, and answering my question. I put in the code that you suggested and now I am getting what I believe to be an error message when I click on the command button. What the error message says is "Object doesn't support this property or method." I tried putting the code on other command buttons and I get the same message. I'm trying to fix the problem and will more than likely be trying the rest...
Okay this is the situation I have two forms and they have a 1:M relationship. I don't have enough space screen-wise to do a traditional "drag form to form" to create a subform so what I did was create command buttons that open the subform when I click on it.
I added a filter to the VBA that filters the results of the subform to display only records that match the linking field of the two forms. And it those and would filter...
Did you ever figure out the solution to this problem? I am trying to do the exact same thing. Only problem I am having is when putting information into the stand-alone forms the foriegn key value (in the underlying table) that is in subform does not get populated with the primary key value of the parent form that entered before opening the subform. I used this code:
Code:
Private Sub Command52_Click()
On Error GoTo Err_Command52_Click
Leave a comment: