Let's begin with the path. First tier, click "contacts". Second tier loads "lookup". You click a letter from the alphabet and the combobox populates. You pick from the combobox and it loads the "contact card" portion of this form. All of this works like peaches. I have an "edit" link so that you navigate away from the contact card. I have no problems with the browse to portion ...
1. set tempvar
2. browseto "Contact List" where id=id
The "contact list" is part of the first tier's "contacts" tab, but is a second tier button named "manage".
Everything works great on this page until I want to use the search boxes and combo box. They populate, but the refresh or bookmark or some such stops working after the browse to.
Funnier still yet .... If you click the "manage" button after you browseto, the combobox selection will load.
What the heck?
Code for the box refresh button is in the onclick event ....
Code for the search boxes' button to populate the combobox ....
While I am tweaking still yet, the code is a little rough or disorganized.
Tell me what the heck is happening after the browseto that essentially disables this code.
Edit: Option Expicit and still compiled. :-/ Problem remains.
1. set tempvar
2. browseto "Contact List" where id=id
The "contact list" is part of the first tier's "contacts" tab, but is a second tier button named "manage".
Everything works great on this page until I want to use the search boxes and combo box. They populate, but the refresh or bookmark or some such stops working after the browse to.
Funnier still yet .... If you click the "manage" button after you browseto, the combobox selection will load.
What the heck?
Code for the box refresh button is in the onclick event ....
Private Sub Command74_Click()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![combosearchbox], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Code for the search boxes' button to populate the combobox ....
Private Sub refreshSearchbttn_Click()
Dim query As String
'Define row source after selection and open first contact in table
query = "SELECT [qryContactList].[ContactID],[qryContactList].[FirstName] " & _
"& "" "" & [qryContactList].[LastName] AS Name FROM qryContactList " & _
"ORDER BY [LastName], [FirstName];"
Me.combosearchbox.RowSource = query
Me.combosearchbox.Requery
'Shows name of first contact and expands the list
Me.combosearchbox.SetFocus
Me.combosearchbox = Me.combosearchbox.ItemData(0)
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![combosearchbox], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'Set focus on search box and drop list down to show all contacts of search
Me.combosearchbox.SetFocus
Me.combosearchbox.Dropdown
End Sub
While I am tweaking still yet, the code is a little rough or disorganized.
Tell me what the heck is happening after the browseto that essentially disables this code.
Edit: Option Expicit and still compiled. :-/ Problem remains.
Last edited: