Last problem for the day, before I go home and remind myself that love still exists in the world!
I have a form that I'm trying to make multipurpose. It's the form I was working on here. That one wrote to the "tblOwnersmm" table. I want another to write to the "tblResourcesmm" table. Instead of duplicating all the objects, I figured I'd just throw some variables in and reuse what I had. Everything works EXCEPT for one thing... When the form opens, it's showing the previous rowsource. So, if I reopen the same thing (owners or resources) it looks perfect. But if you open one then the other, it shows you the previous list.
I have queries made for both of these. Here's my code, which I've tried on Form_Open and Form_Load
Code:
Select Case TempVars!strFormTable
Case "tblOwnersmm"
Me.RecordSource = "tblOwnersmm"
Me.lbSource.RowSource = "qryOwnerUnassigned"
Me.lbDestination.RowSource = "qryOwnerAssigned"
'MsgBox "owner"
Case "tblResourcesmm"
Me.RecordSource = "tblResourcesmm"
Me.lbSource.RowSource = "qryResourceUnassigned"
Me.lbDestination.RowSource = "qryResourceAssigned"
'MsgBox "resource"
End Select
Me.Requery
Me.lbSource.Requery
Me.lbDestination.Requery
Is that enough to see what I've missed? It's making the updates to rowsource and recordsource, but it doesn't seem to take effect until the NEXT time the form opens.
Thanks in advance!