Hi Guys,
I figured out a solution for what I wanted to do. It required 3 things to
achieve the results I wanted. I'm working with a table named "Documents"
that's already been numbered sequentially 1, 2, 3 etc. by using the Make
Table query. In it are document numbers I want to display as the user
navigates through the table.
Here's what I needed:
1. Unbound Combo Box ( Query points to fields DocID, DocNumber)
2. Hidden Combo Box bound to table field "Documents"
3. Text Box bound to Hidden Combo Box
The Text Box displays the document number and description at the top of the
form as the user navigates to different records.
Unbound Combo box is used to hold document numbers by department like
"Admin, Clerical, Laboratory" so I created buttons to represent each
department. When a department button is clicked that record group is loaded
into Unbound Combo box with code as follows:
Private Sub btnAdmin_Click()
' Define query string
strSQL = "SELECT Dept.DeptID, Dept.[Document Number], Dept.[Document Title]
FROM Dept WHERE Dept.[Document Number] Like 'A-*';"
Forms!DocMatrix!cboDocNumers.RowSource = strSQL
' Fill ComboBox with courses chosen above
Me.cboDocNumers.Requery
' Force ComboBox to drop down
Me.cboDocNumers.SetFocus
Me.cboDocNumers.Dropdown
End Sub
Now, instead of a user having to scroll through hundreds of docs they can
scroll by department group. Also, they always know what the current record is
by looking at the text box at the top of the form window. I have code that
finds the selected records in Unbound Combo Box so everything now works great.
Thank you guys for replying. I hope this post can help others.
-Simon