I have a popup form with a combobox that lets you select a value from the primary key of one of my tables.
After I select a value, I want the popup form to close and for another form to open with the observation I selected in the first form populating the second form.
This code does everything I want except close the first popup form:
Private sub ID_AfterUpdate()
Dim id as String
id=Me.ComboBox
DoCmd.OpenForm "Part II",,,,,,id
end sub
This code does what I want except it doesn't close the popup form so I tried:
Private sub ID_AfterUpdate()
Dim id as String
id=Me.ComboBox
DoCmd.Close
DoCmd.OpenForm "Part II",,,,,,id
end sub
But now it doesn't work at all. I simply get "Object doesn't support this property or method". I also tried:
Private sub ID_AfterUpdate()
Dim id as String
id=Me.ComboBox
DoCmd.OpenForm "Part II",,,,,,id
DoCmd.Close
end sub
But that doesn't work at all, doesn't open the second form or close the first form.
DoCmd.ClosewithMe.Visible = Falseinstead. - RBarryYoung