Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox to be invisible after record select 1

Status
Not open for further replies.

TerryEA

Technical User
Jun 20, 2004
99
GB
Hi All

I know it's easy enough to make a combox invisible, but what I want it to be invisible (o disabled) as soon as I've used it to select and display a record. I tried this in the After Update event of the combo box:


Me!Combo92.Visible = False


but it didn't work. Any ideas:


So the code in the After Update Event is as follows:


Private Sub Combo92_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ACREF] = '" & Me![Combo92] & "'"
Me.Bookmark = rs.Bookmark

Me!Combo92.Visible = False
End Sub


 
How/When would the combo be visible again ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PVS

The combo box would only visible again once the form has been closed and reloaded from a switchboard. The idea is that the user mustn't be allowed to change to another record until the routine (which is complicated and has to do with allocating payments in accounts) is satisfactorily completed. In other words, once the user has started he cannot go to another account.

Hope this is clear.

Terry
 
PHV

Sorry, got your name wrong - its been a long day.

Terry
 
How are ya TerryEA . . .
Microsoft said:
[blue]You can't hide a control that has the focus.[/blue]
Move the focus somewhere else first.
Code:
[blue]   Me!TextboxName.SetFocus
   Me!Combo92.Visible = False[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Hi TheAceMan1

Yep, that did. Many Thanks. I should have worked that one out for myself, I guess. Thanks again

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top