Reputation: 115
In an access form, I try to make a list field visible when the fokus is on another textfield in which new data should be filled in. The backround is that one should know the last data inputs to create a new one. As a first step I tried to make the list (liste91) visible when clicking on a button, but I failed using the following code.
Private Sub Befehl97_Click()
Forms!projects!liste91.SetFocus
Me.liste91.visible = True
End Sub
I get error in the line Me.list91 what is wrong? thank you for your help!
Upvotes: 0
Views: 501
Reputation: 445
You can't set focus to something not yet visible. Just switch the order:
Private Sub Befehl97_Click()
Me.liste91.visible = True
Me.liste91.SetFocus
End Sub
Upvotes: 1