Hi -
I created an app for keeping track of our IT inventory. There are several forms:
Asset List shows all records in the Assets table. For the form's OnCurrent event, I tell it to open the form AssetDetail, which shows details of the particular asset. Works OK. Here's the code for openingAssetDetail:
Private Sub Form_Current()
DoCmd.OpenForm "AssetDetail", acNormal, , "AssetTag = Forms![Asset List]![AssetTag]"
End Sub
I have a form Seat List, which shows all seats (people's workstations basically). Using the same kind of logic as Asset List, it opens Seat Detail when the OnCurrent event is triggered.for Seat List. Here's that code:
Option Compare Database
Private Sub Form_Current()
DoCmd.OpenForm "Seat Detail", acNormal, , "SeatID=Forms![Seat List]![SeatID]"
End Sub
But, with all forms closed, if I open Seat List, I get a message asking for a value for the asset tag....
....and, if I say OK, then the AssetDetail form is open as well as the two seat-related forms.
If I delete the code in Asset List for opening AssetDetail, then the problem with Seat List goes away.
My intuition is that this has something to do with the modules, but I don't know what.
I appreciate any guidance.
Thanks,
David